Apparently, the whole thing comes from a century or more ago when you'd go to this "chemist" shop to get anything related to chemicals, whether it was drugs, arsenic (to kill rats, or perhaps your spouse), developing chemicals for your camera film, or petrol for your motorcar. Like so many things, the British simply refused to change when newer, more modern ways came along, and they kept calling this place and person "chemist" even though the person had a degree in Pharmacology.
Maybe one of these days, after they finally all call this place a "pharmacy", the UK will finally have sink faucets which actually mix hot and cold water like every other country on the planet, instead of having separate hot and cold ones.
Can be (and is) very confusing because some countries don't even give Pharmacology degrees, only Pharmacy ones. But afaik UK does both.