But I can rent a dedicated server at hetzner, use ssh and set it all up. No need for a staff.
The difference is the dedicated server setup requires domain specific knowledge.
If the project needs to scale, a SaaS will become a huge cost in the overall operation and having a dedicated server is much better.
Hiring staff is still cheaper than paying a SaaS, at large scale.
You can pay for a lot of seats with a $70k salary and that's on the very low end.
If you account for opportunity cost you have to be very large before on-prem becomes worth while or your time must be worth so little that you're probably better doing another business.
Start with a few services at ~10$/user/month and it doesn’t take a very large org before the numbers get quite high. And you generally still need some technical support in house.
Software pricing is a reflection of the fact that it's not a consumable good and the humans that make it have ongoing expenses like rent— not necessarily that it's hosted. Even in the bits in a box days the business was built around recurring revenue, you could choose to not buy the next version but it implicitly relied on most people not doing that.
If you're not a larger company you are paying consultants and the licensing fees.
Until hard drive died on that server and turns out backups were broken for the last 5 years.
Until someone tried to fix some (real or perceived) problem with the server and it suddenly became full of malware.