I think it's to do with licencing laws and what licencing different types of shops have for selling medicines (note that in the UK, OTC refers to medicines that are kept behind a pharmacy counter and that you have to ask for, not medicines that are kept on the shelves in a supermarket).
Supermarkets/regular shops can only sell 2 packets of pain relief tablets (32 tablets in total) to a customer, so if you brought up 16 aspirin, 16 paracetamol and 16 ibuprofen to the till, you would only be allowed to purchase two of the three packets.
Pharmacies, on the other hand, are able to sell more from behind the pharmacy counter. I work in the pharmacy department of Boots and if you pay for painkillers at the main checkouts, you can only purchase 2 packets (32 tablets in total), but if you go to the pharmacy counter, you could potentially buy 32 paracetamol, plus 100 ibuprofen, plus (I think) up to 100 aspirin. However, the amount of tablets you can buy from the pharmacy counter is determined by the pharmacist on duty, so they may decide they are not comfortable with selling that many tablets to one customer. It is common for customers to purchase 32 paracetamol plus 100 ibuprofen from us though. Occasionally, a pharmacist may allow someone to buy 64 paracetamol, but this is usually only if there is a medical reason for needing to buy more than one packet - we have to ask who it is for, why they need the tablets and then check with the pharmacist to see if we are allowed to sell them.
Just a note: you can no longer buy more than 32 tablets containing codeine (co-codamol, Syndol, Migraleve, Nurofen Plus, Paramol etc.) as regulations have been tightened for codeine sales recently and more than 32 tablets is now prescription-only.