Your phone speaker is about the size of a fingernail. It cannot physically produce a deep bass note. Yet when a bass line plays, you hear the bass. The pitch you hear is not coming out of the speaker at all.
Almost every musical note is a stack of pure sine waves. A note with a fundamental of 100 Hz also contains waves at 200, 300, 400 Hz and so on. These are called harmonics. The loudest and lowest one is usually the fundamental, and it normally sets the pitch you hear.
Now try deleting it. The panel below builds a note from its first eight harmonics. Tap the buttons to switch each one on or off, then press play.
Switch off harmonic 1 and look at the wave. It changes shape, but it still repeats at exactly the same interval as before. Harmonics 2, 3 and 4 together line up once every cycle of the missing fundamental, because they are all whole-number multiples of it.
Your ear is built to read that repetition rate. Press play with only harmonics 2 to 8 and the pitch you hear is the same as with all eight. There is no energy at that frequency, yet the pitch is there.
Now try only the even ones (2, 4, 6, 8). The pattern repeats twice as fast, and the pitch jumps up an octave. The pitch follows the repeat rate, which is set by the common spacing between the harmonics.
One early idea was that the ear itself distorts the sound and creates the missing frequency. In 1954 J. C. R. Licklider tested this by adding noise that would have masked any such distortion. Listeners still heard the missing pitch, so the pitch is computed by the nervous system rather than created in the ear.
The leading model is that neurons track the timing of the wave's repeating peaks, something like an autocorrelation. It is not a complete explanation, and some people tend to hear the individual overtones instead of the combined pitch.
Telephones traditionally cut off sound below about 300 Hz, yet a man's voice with a fundamental near 150 Hz still sounds like his voice. Small speakers and some headphones exploit the same effect on purpose: they add harmonics above a bass note so you perceive the low pitch they cannot actually reproduce.
The takeaway: pitch is not a frequency present in the air. It is something your brain infers from the pattern.