Some pharmacies have a rule about this. For example, they won’t let you refill a 30-day prescription until nearly 30 days have elapsed. I don’t know if it’s their policy or a law.
But if I had to bet I’d say it was on orders from their insurer.