The problem with actually owning hardware is that you need a lot of it, and need to be prepared to manage things like upgrading firmware. You need to keep on top of the advisories for your network card, the power unit, the enterprise management card, etc. etc. If something goes wrong someone might need to drive in and plug in a keyboard.
Eventually we admitted to ourselves we didn't want those problems.
At one point in the early 2000's, my brother was soldering new capacitors onto dell raid cards. (I like to call that full-stack ops.)
Most expense is initial setup and automation, but once you get thru that hump and have non-spiky loads it can be massively cheaper
Then, say if the motherboard gives up, you have to do quite a bit of work to get it replaced, you might be down for hours or maybe days.
For a single server I don't think it makes sense. For 8 servers, maybe. Depends on the opportunity cost.
Using something like AWS can make it easy to assume that servers don’t fail often but that’s because the major players have all of that behind the scenes, heavily tested, and will migrate VMs when prefail indicators trigger but before stuff is done.
Have you seen what the LLM crowd have done to server prices ?
But it's indeed cheaper with high, sustained workloads.