The shape of a structure is no accident. Engineers and architects go to great lengths to ensure that the structure they are designing will be able to serve its intended function. Most importantly, however, are the decisions they make to ensure the stability of the structure. Often it is the shape of a structure and its parts that determines the structure's strength.
Rectangles (and squares) are certainly common in all types of structures, especially buildings. Windows and doorways nearly always take these forms. These shapes, however, are more often chosen for aesthetic reasons than for their inherent strength. In fact, without support along their vertical sides and/or strengthening of their joints, rectangles are very unstable. Even small loads applied to the top of an unsupported rectangle can cause the shape to shift and deform, becoming more of a parallelogram than a rectangle.
Arches are inherently stronger than rectangles. A force applied to the top of an arch, for example, will be carried vertically and horizontally in an arc along the length of the arch's sides, all the way to its base. Still, very large loads can cause an arch to deform, or bend, beyond the breaking point, especially when individual sections of the arch fail to align perfectly. To overcome the unavoidable weaknesses in an arch, engineers sometimes strengthen them with heavy buttresses, or walls along their sides and bases.
If there is a single most important shape in engineering, it is the triangle. Unlike the rectangle, the triangle cannot be deformed without changing the length of one of its sides or breaking one of its joints, and that's hard to do. In fact, one of the simplest ways to strengthen a rectangle is to add supports that form triangles at its corners or across its diagonal length. Even a single support connecting two opposite corners greatly strengthens a rectangle by effectively turning the shape into two triangles. In bridges and domes, triangles are often connected together to form one very stiff yet light beam or panel, called a truss.