The eardrum blocks bacteria from getting into the middle ear. If the eardrum tears apart, or ruptures, bacteria can easily get into the middle ear and cause an infection.