There are many variables that enter into a cost-benefit calculation when thinking about this. But what it really comes down to is Scale. Projects on the low end of scaling will find it cheaper to outsource everything they can. But at higher scale? Think about it like this: Instead of building their own data centers, does it make sense for Amazon or Google to just colo space in other people's data centers to build AWS or GCP? Of course it doesn't.
So, those are the bounds of our "scale scale". At some point it becomes cheaper to move off managed products and onto VMs in the cloud. At some point after that, it becomes cheaper to deploy your own metal. The challenge companies need to solve is determining where they're at, and cost-optimizing parts where they can save money. A great example is Netflix; they're nearly totally on AWS, but they've cost-optimized their CDN significantly to save money on bandwidth by getting out of AWS.
QoS is another consideration. Deploying your own metal is hard, and the quality of the service you provide might degrade. But don't marginalize the other end of that scale; there are QoS downsides to going full managed like with Lambda. Its another variable to consider.
Lambda -> EC2 is the same kind of cost-optimization movement, just further down in scaling. At some point Lambda will become too expensive. Then, you'll probably want to move to something like managed Kubernetes/ECS, which has almost no administrative overhead compared to just EC2 instances but still makes scaling relatively easy.
However, every sysadmin I've met (and I used to be one) would like to think they are managing Walmart's trucking fleet, when the reality is they are more like Joe's local furniture delivery.