Many people sit, some stand outside of a large brick building.
people sit and stand together by a building
"Sit and stand together by a building," is a rephrasing of, "sit, some stand outside of a large brick building."
If people are sitting outside of a building, they are by it.
Due to space issue people sit and stand outside the building.