Assigned gender at birth pharmacy

So I aren't able to book a GP appointment as they are fully booked for the next 2 weeks but with pharmacies now able to prescribe I decided to use one of them. I have a sore throat and suffer with tonsillitis often. So I filled out all the information to get some antibiotics however each pharmacy I have tried keeps asking for my sex or gender at birth and I don't see how that is relevant at all or why they should be asking. Is there a good reason they are asking or is this just blatant transphobic behaviour?