yeah, that's why in an average on-prem setup you usually would have firewalls, DMZs, IDS/IPS and all the good stuff - and people have been doing on-prem security for decades and accumulated an enormous wealth of knowledge and practice.
in cloud - it all new. people are still figuring out how to deploy their software so that it works both for users and developers. That's why on average onprem is more secure than cloud.
Maybe I'm crazy but I'm not sure all that security makes things more secure than the cloud.
I feel like the hacks I hear about are pretty evenly distributed between cloud and on prem type setups... and most of the big ransomware attacks are almost exclusive to on prem.