Isn't this also because of tax considerations ? If you make a profit you have to pay taxes, so its better to inflate expenses as much as possible. However this argument gives some credibility to the business models of these companies.
In addition, if they were merely inflating expenses, then they'd be able to adjust and have plenty cash. This doesn't seem to be the case.
One of the reasons Amazon spent so much over the years was to reduce the amount paid in taxes. So instead of "inflate expenses" it's really "reinvest".
For example, there are specific tax credits for R&D, which can include software if documented properly.
There exist constant taxes over non-liquid assets. I am pretty sure we'll people that have been bankrupt over then if we look. They just aren't a problem for people with money (top of middle class or above).