When the cloud is not the best option
It feels like in our current world that the new thing is always the perceived as the best thing. Some examples might include, streaming media versus physical media, an e-reader versus a book, or using a tablet rather than a pad of paper. The fact that technology moves so fast, it's easy to understand why people believe that. But sometimes the tried and true methods of doing things can still be considered a superior way to get things done. This can also be true for Information Technology. The old way of having on-premise servers can offer things that the cloud does not. Three areas where on-premise can be a better option are performance, cost, and privacy.
Performance
Leveraging the public cloud is certainly more convenient. It's effectively infinitely scalable, does not require late night visits to replace failed hardware, and changes can be made from anywhere in the world. But a place that the cloud has a hard time keeping up with on-premise is performance. When you are looking for the best performance you can get, it's really hard to beat being on-premise. The two types of performance that we can quickly look into are CPU performance, and disk performance. It's true that cloud resources are using the same CPU's that can be purchased when purchasing your own hardware. But when you run that hardware in your own location, there is one thing that you have to factor in. You are not sharing that hardware with anyone else. To get the best return on investment for the cloud vendor, they need to load those servers up with as many customers workloads as possible. When doing CPU intensive tasks, this performance hit is noticeable. You will always seem better performance in the data center running on dedicated hardware.
Storage performance is the other easily measurable place to that performance bottlenecks can be noticeable. Though the cloud offers SSD's and very performant storage options, you are sharing that storage with all the other customers. To achieve the performance targets the cloud vendor gives you, they have to put limits on everyone. This is not necessarily the case when running on-premise. As long as there is not a massive bottleneck in your hardware choices, the storage can absolutely outpace what can be achieved in the cloud.
Cost
The above paragraphs can easily be refuted by someone saying "the cloud has tons of performance, you just need to pay for it" This is true and leads into my next point. The cloud can get expensive quickly. If you are looking to get the speed of on-premise out of the cloud, it's going to cost you. For example, Azure has the concept of Ultra Disks and AWS io2 to get the highest performance out of the disks. But they are also the most expensive storage options, along with additional requirements for what VM or EC2 instance can use them as well. So depending on what is needed and how it's deployed, it can be cheaper to host the hardware yourself or in a colocated data center.
The cost concern is not always performance based either. There are instances where a cost conscious cloud architect or admin is asked to move data to the cloud so it can be archived. The concept of archived data in the cloud is that the data needs to exist but will be accessed extremely rarely if ever. I've heard stories from Hollywood where a TV studio takes an old TV show and archives it to the either Azure Archive or AWS Glacier. The cost to house this data on a monthly basis is very low. But then there is renewed interest in that old show. Getting all episodes of that show out of archive becomes a multi million dollar expense, because the cost to "re-hydrate" the data is so high. Public cloud vendors like to make it cheap to get into the cloud, but expensive to leave.
Privacy
Over the past few years the cloud has shown how robust it can be from a privacy perspective. For the services the cloud offers, they leverage encryption while the data is moving as well as when it's at rest. There are still regulations that require that the security be more robust then the cloud can provide. Those regulations may come from international laws, governing bodies, or industry certifications, among other places. There is also the possibility that the security team from a company may not feel comfortable with a cloud vendor hosting all the security secrets or managing the keys to company data. When hosting on-premise a lot of those concerns go away. Especially if using technology like self-encrypting drives. The downside is the onus of end-to-end encryption of data in transit needs to be handled by the company, but that usually entails, a little more architecture time, checking some boxes, and installing certificates in strategic locations. The upside is the business can be rest assured that it's valuable data is safe in it's own four walls.
In Conclusion
Though the cloud is an amazing technology that has helped empower a massive amount of entrepreneurs, as well as given rise to wonderful new business ideas that would've been cost prohibitive otherwise. The cloud is not always the best option. The workload needs to be reviewed. As cost/benefit analysis should be done. At the end of the day it may be better to run the workload on-premise. A Hybrid approach is also a great way to get the best of both worlds. At the end this is not to say that the cloud is bad because it's not as fast, cost effective or secure. Cloud vendors have to deal with things that a smaller business running a data center does not, like latency for regional replication of data. Those benefits to options to the customer robs the cloud of possible performance. At the end of the day on-premise or the cloud are just different types of tools. Sometimes a mallet is a better option rather than a sledge hammer.