Four-sidedness is used, with striking consistency across unrelated traditions, for the earth, the settled and the ordered.
Chinese cosmology states it outright: tian yuan di fang, heaven is round and earth is square. The Temple of Heaven and the Altar of Earth in Beijing are built on that distinction, round and square respectively, and the same pairing governs much older ritual jade, the disc and the tube. The principle is at least two thousand years old and shaped Chinese cartography and city planning for most of that time.
Indian architecture works from the Vastu Purusha mandala, a square grid, commonly of 64 or 81 cells, with a cosmic figure laid within it and deities assigned to the compartments. Temple plans, and in the prescriptive texts town plans, are set out upon it. The square here is not a symbol applied to the building; it is the instrument by which the building is measured out.
Islamic garden design uses the chahar bagh, the fourfold garden divided by water channels into quarters, a form running from Persian precedent through Mughal India and connected within its own tradition to the four rivers of paradise described in the Quran. The Kaaba is a roughly cubic structure, and Muslims orient prayer toward it from anywhere on earth.
The four cardinal directions, the four classical elements, the four humours, the four rivers of Eden, the four winds and the four evangelists all sit within the same family of associations, and a good deal of medieval European diagrammatic thought consists of mapping one set of four onto another.
Geometrically the square tiles the plane, meets itself at right angles, and is the shape that a plumb line and a level naturally produce. That practical fact, that squareness is simply what careful building yields, probably underwrites more of the symbolism than any doctrine does.