One doctors theories on this deals with the Cerebellar/Vestibular System where the Inner Ear's signals are processed in the brain. Any breakdown or dysfunction in that communication loop can result in anything from almost unnoticeable symptoms to disability like my cases is.
I've also worked around loud machinery. I've worked around Centrifugal Chill Water A/C units used in large commercial applications. They have a real high pitch sound. But I've had life long Vestibular {Inner Ear} issues. I'm at 60% hearing loss in the talking range and over 40% loss overall. IOW without my hearing aids I can't even hear birds.
BTW Vestibular Disorders are a major culprit in persons having Panic Attacks and being misdiagnosed with Anxiety Disorders. SSDI has me listed as having General Anxiety Disorder. I pinned down the Vestibular origin of it a few years later. I had to retire over 18 years ago at age 36.
I always wondered if thousands of years ago since people needed better hearing to survive they used they hearing more and it was developed better, but now not needing hearing as much to survive the brain does as you said filters the sounds out as unnecessary.
I guess that’s why some people are lite sleepers and some aren’t. An unusual sound can wake you up while a normal sound, even a train going by, wont wake you up.
It’s the survival instinct I guess.
A lot of times I can hear people talk but I can’t understand what they are saying because of background noise.
It’s almost as if nothing gets filtered.