In fact, it's not hard to understand why this group of survivors retreated into this building. The reasons are probably the same as why Ling Mo chose this place. First of all, this building is closest to the gate, and secondly, the location is the best. On one side is a man-made creek, on the other side is a fountain square, and there is a certain distance from the surrounding buildings. This way, they won't be trapped in a circle, and there are several escape routes.
It seems these people were planning to use this building to buy some time and then take the chance to escape from the other side.