The purpose is not prevent you getting the virus it is to prevent you from giving the virus to the pharmacy workers.
COVID-19 is a respiratory illness, it is not shed from your skin. Your skin is an organ (remember that little fact from middle school biology?) that protects you from viruses and bacteria. Gloves aren't magic. You still have to refrain from touching your face when you have them on, wash your hands after you put your purchases away, sanitize your phone, doorknob, etc.
Meanwhile, the last store I shopped in was Key Food up on 86th and Northern. They didn't require that I put on a pair of gloves to enter. The guy at the door though wouldn't get the hell out of the way so I could pass by him with at least six feet of space. He took one step aside so I would have had at best two feet between him and me. I asked him repeatedly to give me space. He seemed to understand me, but didn't seem to understand 2 feet is not 6 feet. It was only after I started to get very upset that he moved.
That and the price gouging and I'm not going back. Hell if I know where to shop though anymore. C-Town wasn't offering senior hours, and I'm still haunted by the extreme overcrowding at the Foodtown in mid-March.