Because, at least from my software dev perspective, if upper management realizes how easy it would be to make someone on the team a "team lead" pay them a smidge more and then use metric tools to make sure stuff got done there would be no need for middle managers.
I work for a fortune 500, tons of beauracracy, and the people always moaning about people being in the office are most often the least useful people in the building. Lording over people's cubes "keeping tabs" is seen as a way to tell their bosses they are valuable.
Ive said it so many times to my boss who is on my side and has fought for me to WFH: "If I stop working you will know it instantly, things won't work and besides theres an entire dashboard I have to self report my progress to which again I can lie on for a bit, but will be obvious if I do so longer than a week".
There's also another factor of the sunk cost fallacy, many corps own buildings or are on long leases, leaving them empty looks like a massive waste of money even though tbh leaving them empty by my assessment would actually save them money.
It's usually just not declaring profits in my experience, it's brutally addictive to slap 30% ish profit on top of everything.
My boss at a pizza place had 2 registers he would use for various reasons but it all boiled down to one being reported to the IRS and the other not.
I know a liqour store that has a small bar inside thats cash only, I got friendly enough with a manger that basically admitted the locals that hung out there were mostly blue collar and came in after work where they got payed cash. Meanwhile the retail liqour customers largely were card users. So the owner made the bar cash so he could report less. Makes sense why its the cheapest bar around by a large margin.