Licensed Veterinarians are monitored and licensed with their state pharmacy board. Most medicines are ordered through Veterinary Distributors. That being said, some of the major manufacturers Novartis, Merial, & Bayer pulled everything back "in house" a couple of years ago. This is to track the illegal selling of products to online pharmacies.
I do not want to debate this subject, but I worry that some day because of these pharmacies Vets will no longer carry meds in house. This will mean for whatever drug a pet needs, they will have to wait for a script to arrive. Me, if my pet is sick I want the medicine to start immediately.
That said, the pharmacy income helps your Vet open his doors each day, and be there for his patients with a staff and the diagnostic equipment needed to run a hospital. He is not a warehouse with people taking phone orders.