In China, factory workers often live in dormitories provided by the factory. So in essence, the factories function like little towns with shops and facilities (such as this basketball court) inside.