You might think someone could be 25 but very clearly not under 18. If that's the case, why do they have to ID?
Because in order to get and keep a licence to sell alcohol, you have to meet certain mandatory conditions and one of those is you must have a challenge policy in place. Challenge 21 and more so challenge 25 are considered best practice. If someone looks under 25, then by the conditions of the licence you should ID them or you've broken the condition. And it doesn't matter if they are over 18, the policy is to ID if you look under 25, not if you look under 18.
You do not have to potentially or actually break the law to break or potentially break a licence condition, and breaking licence conditions can lead to sanctions on said licence such as certain people not allowed to serve alcohol (that's someone lost their job then) a fine for the licence holder, restrictions on when alcohol can be sold, being told that a more robust policy needs to be put in place (so you've got challenge 21 and can't prove you adhere to it, so licencing come along, slap your wrists and say you must put a better one in place and prove you're using it, by recording IDing people), or ultimately losing the licence - no licence means no booze for anyone and a significant loss of revenue. You need to show you're a responsible retailer or you lose the ability to sell it in the first place.
So retailers and staff will protect the licence. Licencing teams and the police are the ones who control this, and they are not in the slightest bit interested in customer service or making customers lives easier, because their job is to oversee the sales of restricted items to the general public through licenced premises. They are not interested in "She looked 20 so I didn't need to ID" if she looked 20 and your challenge policy is 25, and you didn't ID then although the law isn't broken, the licencing condition is.
Another mandatory condition is providing 'potable' water free of charge - you stand to get sanctions for not doing that too should you refuse (just another example of a mandatory condition required for a licence).
They actively test this with mystery shoppers and by inspection of premises looking at ID logs etc. If the ID log isn't used 'enough' then they can (and do ime) pull you up on it.
Most people have zero awareness of this, even those selling alcohol who aren't licence holders, they just know they are told they have to ID someone who looks under 25 if they have that policy in place.
And what are the hard and fast parameters for looking 18, 21, 25, 32, 45? There's not a checklist out there I'd bet my job and personal licence on quite honestly. It's down to the individual perception and everyone's is different. If you had to bet your driving licence on guessing someone's age, would you do it? If getting it wrong meant you lost that licence and your job relies upon that licence?