Because let's say you're the only person who showed up to work today. Trying to fill prescriptions puts your back to the rest of the store, maybe even takes you behind shelves. Makes it easy for you to get held up. Also shoplifting but I'm more concerned about your safety. With the drive through, you can give desperate sick people their prescriptions, and people who want other stuff can get it elsewhere.
Because opening up the entire interior of the store requires staffing and security... Having a service window with heavy glass and a two way box requires one person who does not need to be able to take care of themselves security wise.
I've known enough people that would take their business elsewhere if this one didn't have a drive thru. They think they are saving time by using the drive thru even when the other location is an additonal 10 minutes of driving away.