It can also be a neurological or psychological issue. I had my hearing tested after years of being totally unable to pick out voices in a noisy environment. Turns out my hearing is actually above average. My ENT suggested that I might just be "bad at hearing", in the same way that one might have poor memory, or have poor visual-spatial awareness. It's apparently a skill that can be trained.
I never thought of it that way but it makes sense. My hearing is fine and I can pick out quiet sounds, far away sounds, high-pitched sounds, etc... But I always have trouble turning the sounds that comes out of people's mouths into words especially if there's other noise. It's not a focus issue, either. I'm probably just bad at hearing speech in those situations for some reason.
I feel research in this area would be very relevant to foreign language learning. At some point you go from hearing gibberish to individual words, and then to being fast enough to assemble the words into meaning.
I have heard this[1] and my girlfriend (an amature musician) has worse hearing than me generally (subjectively based on quiet situations picking out very quiet sounds or high frequencies) but is way better than me in loud enviornments.