As a trigonal bipyramidal molecule undergoes Berry pseudorotation, it proceeds via an intermediary stage with the square pyramidal geometry.  Thus even though the geometry is rarely seen as the ground state, it is accessed by a low energy distortion from a trigonal bipyramid.
Pseudorotation also occurs in square pyramidal molecules. Molecules with this geometry, as opposed to trigonal bipyramidal, exhibit heavier vibration. The mechanism used is similar to the Berry mechanism.