OTOH, I wouldn't want to have to have a payment relationship with my employer after I left. Sometimes it's nice to keep a 401k with an old employer, but you end up caught up in their drama still --- when they change 401k providers, you need to pay attention, if they go through a merger, you need to pay attention, etc. It would be worse if they were administering your mortgage.
Now --- if they want to partner with a bank/credit union and subsidize a lower rate or something, that might make sense. It could be win-win-win; it might be less risky loans for the bank, a nice perk for the employee, and a way to attract employees. Of course, it depends on what happens the employer; it also concentrates the loan portfolio of the bank; if you had a lot of loans to employees of a company that has a big problem, you've now got a lot of borrowers risking default at the same time.
Honestly, if my bigtech employer had some company housing benefit, I’d really appreciate it and likely use it. “Company towns” from a century go are so, so different from what a big tech housing development would be: none of us would be getting paid in scrip, we’d easily have transport options outside the corporate housing (it’d probably just be somewhere in the middle of an urban area like South Bay or Queens), we’d be consciously choosing it because of municipal policy failure making housing too expensive and not because it’s literally the only option in the area.
I would have to understand better what you mean by a mortgage though because I doubt I’d want to live in a corporate housing development years after leaving the company. It would probably be better for capitalization (capture the depreciation$$$) for the company to own the building but offer it for rent at a low rate to employees.
If you have a whole pile of balance sheet cash, buying up some city condos and leasing them back to key staff seems like a pretty good investment. You can use them to secure cheap debt if you need liquidity, or sell the leases, and it's an inflation hedge. It seems so simple and progressive that it must be illegal for some reason.