This is an excellent topic for a blog! This is a long time dilemma for veterinarians. First, let me say that we, as vets, cannot be certain where medications come from when sold by someone other than ourselves. We do have several places we trust, likely, but that is because we have built a level of trust with these companies. However, these mass dispensing companies do not reach out to the veterinary community to even make an attempt to allow us to understand them or accept them or their practices. They are strictly a business that cells medications and have very little credibility with veterinarians. Do not expect a company such as PetMeds to tell you they get their drugs from anywhere other than a reputable source.
Since they buy and store large quantities of medications, they are likely able to sell them for significantly less than your veterinarian can. I hope you will agree, however, that they do not give you medical advice, assistance, expertise, hand holding, caring nor do they have the same training as your veterinarian. Your veterinarian cannot afford to sell medications as inexpensively as some pharmacies or drug supply companies because of the cost to the vet and because of the veterinarian's business expenses.
So, your veterinarian very well could be telling you what they believe to be true... and certainly, they cannot meet the price of these mail order pharmacies (that is what keeps the pharmacies in business)... so, you will have to decide which business to support... but do not be upset with your vet-- they are in survival mode.