Why? Anyone going to the pharmacist goes there for the drugs, not for the lectures [or they would be asking for the lectures with the drugs or even instead of drugs]. While the pharmacist has freedom of speech, the customer has much more fundamental freedom not to listen - and not to be unduly bothered. The regulation in question helps to guard the customer from unwanted lectures.
If they don't like the lecture with their drugs, let them go down the road. Pharmacist's don't have 1st amendment rights?