Somewhat more outrageous is the 1031 exchange. Sell VTI at a profit to buy VOO and the government hits you with a capital gains tax. Sell your primary residence for $250k more than you bought it - same thing. But landlords are a special, privileged investor class to whom these rules don't apply. They can sell a house and pay no taxes on gains as long as they buy another property.
And the scale applies at every single step of the process. A citizen homebuyer is playing a oneshot game. There are few discounts to be had and every single fee is its own battle.
A corporation/PE is playing a multi-shot game. There are bulk discounts, relationships, and scale that is applied to everything from title insurance and inspections to cost segregations to filing all of the paperwork.
This is also not really how depreciation works for assets that retain their value. If you buy a building to rent it out, the cost of the building essentially a cost of doing business, i.e. a tax deduction. You pay tax on the profit which is revenue (rents) minus costs (building, interest, maintenance, advertising, etc.) Depreciation is the building, they make you take it over time instead of all at once when you buy it.
But the depreciation lowers the book value of the building, which is your tax basis when you sell it. If you buy a building for a million dollars, depreciate it down to $500,000 and then sell it for $2M, you have a $1.5M capital gain from the sale. You basically have to give back all the depreciation unless the building actually lost that much value by the time you sold it, and in practice it usually goes up instead of down.
It's really the homeowners who have the advantage here because there is a large capital gains tax exemption from the sale of your primary residence, and that's actually a reduction in taxes instead of just a deferral.
As long as they buy another property at least as expensive or more, within a certain time period.
And it's not that they don't pay taxes, it's that the cost basis gets reset. That is the benefit.
Also if you take a 10% gamble on a strategy to save 50k and it backfires and lands you with a 500k legal bill, that's just the cost of business to a big (or even not that big) company, but it'd be absolutely ruinous to private individuals.
Homeowners get a tax exemption but only up to a certain amount in gains.
They can also keep the property forever and continue renting it out, and then never realize the gain. But in both cases that means they don't get to realize the gain -- or even recover their original principal -- except insofar as they're renting it out, and the rent is taxable income.