Barrier 2: That I'm familiar with, tax codes are not friendly to employer-provided housing. ClickCo paying >$X/money to housing Wanda Worker-Bee, when $X/month more pay would let her pick her own as-good housing, is a losing move.
Barrier 3: If you're thinking of ClickCo building housing - talk to an MBA. At scale, housing developments are mammoth capital investments, for something unrelated to ClickCo's business, with (at best) multi-year lead times and very long asset life expectancies.
Barrier 4: If ClickCo wants to scale up, or down, or shift parts of its workforce to or from a location - any housing it has is immovable, and very slow and difficult to scale.
(In general, "migrant labor housing" implies that the workers are paid very poorly. And willing to live in something more like a refugee camp.)
China still has company towns for some SOEs (not even for migrant workers, regular well payed Chinese professionals), but these are usually outside of cities and are more like gated communities. The last time I visited one in Hunan near Leiyang, we had a nice meal at the company restaurant (not the only one). Not really for software-based high tech, where talent accumulation demands central city placement. Heck, they still try putting R&D centers out in the far off suburbs (Microsoft's Zizhu campus in Shanghai) and there is a lot of push back (better to work at Microsoft's more centrally located Beijing campus).
I've seen big companies like Microsoft offer company housing for new immigrants to ease their move to the US. It's also not uncommon for companies to pay for your cross-country move and temporary housing until you can buy a house.