Ear disease is very common in dogs. Some of the reasons can be anatomical - heavy floppy ears affect ear ventilation and hairy ears can collect any discharges.
We sometimes find ear mites as an underlying cause, espeically in puppies , or in the summer a grass seed in the ear can cause irrtiation & infection.Swimming or excessive cleaning can predispose to ear disease.
Much ear disease is associated with allergic skin disease in dogs which is why the vet will be asking you about any other sites of irritation. Because there is an underlying allergy and basically a sweaty ear, secondary bacterial & yeast infections are common making an itchy ear worse & often resulting in smell & discharge. Having a yeast overgrowth in the ear is similiar to having atheletes foot (but in your ear - ouch!). We often do cytology (looking at the discharge under the microscope) in house to try & work out what sort of infection is going on to help choose the most appropriate treatment.
There is a very useful website here with videos and explanations of ear diseae in dogs.