Why aren't passports acceptable ID when buying alcohol?

Sounds like you ran into an asshole. But you helped to set the tone for the entire event. Most stores have big signs saying “If you look under (XX years old), you need ID to purchase alcohol”. The lowest age I am aware of any store using is 30.
Simply put, the clerk should never have had to ask for your ID, you should have provided it as you set down the cider.

Look at it from the cashier’s side, having to wonder if this person really is below the threshold, and also if they’ll get offended if asked for ID. Save them the worry.

I am 43 this year and have grey hair in my beard, and I hand over my ID whenever I buy tobacco or alcohol. Because that’s what an adult does.

I had people telling me a couple of times in bars in the US that my Irish passport wasn’t acceptable ID, I just went “Really???” and they caved. I don’t have an Irish driver’s licence anyway but how many foreign tourists are going to have US issued IDs? Are areas that get a lot of foreign tourists more likely to accept passports?

I bought some wine and beer at a Safeway in Turlock, CA when we were passing through earlier this year. The cashier initially wouldn’t accept my NZ driver’s licence. She called the checkout manager who said they would only accept a US or Canadian licence. I said fine and got out my passport and she only reluctantly accepted that as ID, also saying they normally would only accept a US or Canadian passport! I was quite prepared to leave the whole cart of groceries on the checkout if she wouldn’t sell us the alcohol.
This was the only supermarket in all our 5 weeks travel that had a problem with my NZ licence. Just down the road a bit (so to speak) in Bakersfield or some place near it, the cashier didn’t even ask to see ID.

I’m 58 and have a full head of grey hair and the experience lines on my face to match, but I noticed some places had a sign saying they carded everyone regardless of apparent age.