Just want to chime in and mention those tiny hairs aren't protective. They're hair cells, named because they have tufts of stereocilia, and are what your ear actually uses to hear. When they die, you lose hearing. There are two types, inner and outer, and while the outer can influence the amount of sound detected by the inner hair cells, they can only amplify, not reduce.
The ear protects itself against loud sounds by contracting the tensor tympani and stapedius muscles, dampening the eardrum and tensing and shifting back the ossicles, the small hearing bones of the ear. This all serves to reduce the amount of force transmitted to the inner ear but takes time to occur, so it can't protect against sudden loud noises, like a gunshot.