
The expression "in one ear and out the other" is used to indicate that something heard has been immediately erased from memory, as if it had passed through the brain without leaving a trace.
A few considerations:

First of all, I don't believe a sound can really enter through one ear and exit through the other.

Sound propagating through the air would risk being absorbed by both ears.

Even if it were whispered into one ear only, thus eliminating the possibility that it might accidentally penetrate the other, I doubt it would manage to come out of the opposite ear anyway.
Consequently, whether the sound enters through one ear or through both, it must find another way out. The most plausible explanation is that the sound passes rapidly through the brain, that the vibrations then reach the respiratory tract and finally leave through the nostrils, probably during exhalation.
English translation of the Italian original. Read the original →