What happens if you want to switch jobs? Tying basic necessities like housing to your employer is a disaster that traps people in jobs. It's part of the reason healthcare in the US is so screwed up.
Sure, as long as they can externalize this cost, they won't do this, but in the Bay Area Google determined it costs them less to to fight for housing projects and fund those, than pay the enormous overhead for getting their employees living there.
https://www.mercurynews.com/2021/03/04/google-backs-three-ba...