They're usually expensive as well. You could take oral antibiotics but many people are now deciding that you shouldn't be upsetting your bodies' normal bacterial flora without better reason. And in many remote diving locations you may not be able to find the antibiotics that would work. And without a competent doctor and lab how do you select the proper antibiotic to use. Honestly and seriously, this works.
Commercial ear drops for swimmers are a mixture of isopropyl alcohol and boric acid.
The alcohol mixes with the water and reduces the surface tension. This aids drainage and hastens evaporation. The boric acid changes the pH in the ear canal and the nasties die off. You experience relief in 24 to 36 hours but continue the treatment for 7 to 10 days so the last few nasties don't grow back.