Part of it is timing, part cost. If you can fill a building and plan to be there for a while, generally it pays to buy it rather than rent it. (The renter generally charges a premium to short term borrowers) For financial accounting/engineering purposes (not wanting to show liabilities) firms may do long term leases.
This is why it pays for companies like Apple to own their headquarters.
Overbuilding the HQ is a classic sign of hubris, similar to putting your name on a stadium. (Look to Lehman and Bear Stearns for the former, Enron and 3com for the latter)
Isn't that the same as "cloud vs physical"? If you plan to use a lot of resources consistently for several years, physical is cheaper; if your workload is more transient, you choose virtual.
(The main difference being that real estate can even increase in value, so it is an investment as much as a cost; whereas computers invariably depreciate to 0 in the end.)
Somewhat, though companies (say Netlfix) may use the cloud even when they can fully utilize machines.
A similar analogy is also around core competence - focus on what you are good at (software vs real estate). Bathe world is littered with monuments to companies that overbuilt or overpaid.
This is why it pays for companies like Apple to own their headquarters.
Overbuilding the HQ is a classic sign of hubris, similar to putting your name on a stadium. (Look to Lehman and Bear Stearns for the former, Enron and 3com for the latter)