The technology of the omnidirectional microphone
Looking at directional characteristics from an academic standpoint, the omnidirectional microphone is sensitive to the pressure of the sound wave.
The diaphragm is completely enclosed, apart from a tiny slow-acting air-pressure equalizing vent, and the mic effectively compares the changing pressure of the outside air under the influence of the sound signal with the constant pressure within.
Pressure acts equally in all directions, therefore the mic is equally sensitive in all directions, in theory as we said.
In practice, at higher frequencies where the size of the mic starts to become significant in comparison with the wavelength, the diaphragm will be shielded from sound approaching from the rear and rearward HF response will drop.
So in fact, although a microphone may be described as omnidirectional, it will only be truly omnidirectional up to around 5 kHz, above which its directivity will become more focused.
Some microphones have a special attachment that can help randomize the directivity of incoming sound.