You're simply misunderstanding the role of the police here.
The reality is the police DO "stings" known as Test Purchases with online deliveries. This means they use someone who looks too young to accept an order with restricted age items in it, for example.
So the response of the major supermarkets to the police's Test Purchases is to prohibit their drivers from leaving orders with anyone under 18. Or with those who say they're over 18 but don't produce some form of ID for whatever reason.
But it is NOT illegal as you suggest.
See the Citizens Advice Bureau:
"Businesses selling goods like alcohol, fireworks and cigarettes can ask for proof of age if they think you’re under-age. They can refuse to serve you if you can’t prove how old you are. This is not unlawful age discrimination."
See the Equality And Human Rights:
https://www.equalityhumanrights.com/en/advice-and-guidance/age-discrimination
Age is a protected characteristic, but there are exceptions.
I suggest you first properly understand the law on this issue before starting a post with silliness like "What utter drivel". It really doesn't take long to provide the evidence as I've done.
You might not agree with the policy, but to claim that the police don't get involved with test purchasing and that supermarket policies aren't based with consideration to the law is incorrect.
Also, I did NOT argue that the police enforce supermarket policies. On the contrary, my argument based on the law is that the police DO carry out Test Purchases to see if supermarkets are complying with the law in stores AND on the doorstep!
It is because of this fact that major supermarkets have a policy of not leaving online orders with under 18s and those who appear to be under 25 will be asked to prove their age. If no ID is forthcoming, the order is taken back to store.
This is entirely lawful. 🤷♂️