Your eardrum does two important things. It senses vibrating sound waves and converts the vibration into nerve impulses that convey the sound to your brain. It also protects the middle ear from bacteria as well as water and foreign objects. Normally, the middle ear is sterile. But when you have a ruptured eardrum, bacteria can get into the middle ear and cause an infection known as otitis media.