But by requiring you to say your details out loud within earshot of other people, they are laying you open to the risk that someone else will use your details nefariously.
I had to give out my phone number in Zara in order to make a return. It was visible on the till screen facing outwards into the store. The person behind my in the queue made a note of my number and sent me abusive text messages. After a lot of to-ing and fro-ing I got Zara to change their policy, but I no longer shop there. What if, say, I’d escaped an abusive relationship and the person behind me knew my ex and took down my number and gave it to them ?
Boots requires you to give the date of birth and address of the person you’re collecting a prescription for. Those details can absolutely be used to commit fraud. We should all be much more aware that, even though giving our details does not in itself consist of a GDPR breach, other people can use those details illegally / to our detriment.