On my 8th birthday my dad took a couple friends and I out to dinner and we stopped to buy a video game. My friends and I were arguing about what to get and my dad came by a couple times to get us to hurry up. Finally he said we had to make a decision and ushered us up to the cashier.
As soon as the cashier started to talk a truck off the highway that was above the store crashed through the side wall of the shop with enough speed to hit through every aisle and collapse all the shelving to the back as well as ripping down the ceiling. The guy was covered in blood and slumped over the wheel. No one was hurt in the store luckily, but we all would have been killed if we argued any longer in that aisle. My dad just got us into the car and we drove home. Afterward my dad would just downplay it whenever I would bring it up.
I have worked in a CVS so I can answer this first hand. The main reason is every CVS is critically understaffed to the point of danger to patients.
Beyond that systemic problem that adds delay, actually dispensing the prescription is not the rate limiting step. When you get a prescription there's a whole list of things you need to do before it can be dispensed. In no particular order:
If it's a controlled substance you need the pharmacist to do about 50% of the steps above and access the safe which is a whole process. In the meantime they are on the phone with a doctor or some insurance trying to get something clarified or approved. Or compounding someone's diaper cream. Or doing vaccinations. Or counseling someone on their antibiotic. Some drugs have mandatory monitoring programs you have to enter information from the doctor before they can be dispensed. Some drugs require a dosage syringe, or intramuscular syringes, or needle tips.
Suffice it to to say it is an involved process.