Larger atoms are able to accommodate more electron pairs around them. When atoms from the third row and beyond in the periodic table (S, P, Cl, Br) are the central atom in a molecule, there may be ten or twelve electrons at that atom. These electron pair domains are as far apart as possible when in a trigonal bipyramidal (for five electron pair regions) or octahedral (six electron pair regions) arrangements.
Note that the trigonal bipyramidal shape has the three bonded atoms around the equator of the molecule as far apart as possible at 120°. Likewise the atoms above and below are as far from the equatorial atoms as possible with bond angles of 90°.
AX
6octahedral

AX
5trigonal bipyramid

Octahedral may seem a peculiar name for a shape with six outer atoms. This name is derived from the word octahedron. This is a shape with eight triangular faces and six corners. The six corners are in this case the bonded atoms.