Our bodies n brains are so cool. Think about what goes into locating a sound in space.
Edit: there's more to it but at the most basic level your brain calculates the fraction of a second difference between when one ear picks up a sound and when the other does creating a reference point based on that.