The healthy ear
The ear canal is a tubular extension of the skin with some extra features. Skin cells mature and slough off approximately every three weeks. As this process is harder in a tube, the ear has a self-cleaning mechanism that involves the production of ear wax (otherwise known as cerumen). Skin cells travel outwards and carry wax, microorganisms that normally reside on the skin surface and any foreign material that needs to be removed, towards the ear opening like a conveyor belt. This allows the dog to clean its own ears.
Self cleaning is important - if the ear drum area is covered in wax and skin cells then it is impossible for the dog to hear, one of the senses they rely heavily on.
Not only this, if the self-cleaning mechanism fails, due to inflammation and swelling, dirt and ear wax can build up and create a perfect environment for the normal inhabitants of the skin, bacteria and yeast, to multiply and cause an overgrowth.