Where, how and why wax is secreted?

The outer third of the ear canal contains " cerumen" and " sebaceous" glands. Earwax in secreted for protection of the delicate hearing mechanism within, and to keep the ear canal acidic, therefore deterring infection.