I'm not 100% sure on how they got this way, but from what I hear from my one time interviewing with Capsule, most US pharmacies run a not-for-profit convenience-store operation in the front 80% of the store so that they can attract people to build it into their routine, and then make money off the highly profitable prescription-medicine counter in the back.
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.