I’m not American. I lived in a flat when studying. From what I’ve heard you can’t even cook in US student dorms that’d be an absolute no-go for me. Also, roommates are required and you get no choice in who that’s going to be.
But maybe a better comparison would be to bunks on an oil rig… with the difference that Foxconn workers aren’t required to sleep in barracks, they’re free to sleep elsewhere. No such option on an oil rig. You also see temporary accommodation on larger construction sites. Or farmers offering bunk-beds to seasonal workers.