To achieve the rigidity of a structure (which is not deformed), the profiles must form triangular cells. Cables, bars and braces can be used for this purpose. A structure is made up by 4 bars that is easily deformable.
However, a structure composed of 3 bars may not deform and for this reason most of the metal structures are composed of triangular structures.
The shape of the beams is called Profile. Here you have some examples of the profiles of the different types of metal beams more common: