Each portion of your inner ear is tuned to a certain frequency. When it becomes damaged and receives no input the natural noise gets amplified. This tinnitus. When the hearing aid amplifies a real signal of that frequency the ear’s amp has some input and it overpowers the natural noise. (So the doctor said.). I imagine the hearing aid needs to amplify where your specific frequency is lacking.
I know full well where my specific frequencies are lacking, all on the high end. Everything sounds muddled in my left ear.