I’m not exactly sure why that was the case, but convenience is a plausible reason: you need to be there to pick up your medicine, so why not get your photos developed at the same time?
So the corner drugstore will have prescription drugs, and over-the-counter drugs, and bottled water, snacks, school supplies, greeting cards, basic climate-specific items (winter gloves, sunglasses and flip flops), shaving, cosmetics and makeup.
And to maximize these economies of scope, they'll also have services: an ATM, Western Union money transfers, film developing, digital-camera printing, passport photo printing, photocopying, package drop-off, maybe even a key duplicator machine... you name it.
You can buy food, drinks, condoms, makeup, medicine, photos, and other things. It's a good business because most people need something to do while they wait on the pharmacist so they can purchase anything they need while waiting.