Ugh. Grains are irrelevant. A vast majority of dogs have no problems eating grains. It is a fad that has transferred over from humans that project their needs onto their pets.
If you need to question your vet about that, then you need to find another vet you can trust. Though they won't be a terribly educated one if they believe in the grain-free fad. Feed your dog whatever works for you and your pet - healthy coat, dog likes it, fits your budget, good poops, minimal farts, good weight. However, if they have a medical reason to be eating something else (kidney diet, hypoallergenic diet, etc) then your pet should be eating that diet.
We hardly make any money on selling diets. . I think we have a 5-10% markup (if that) on our diets. Buy it online for all we care (but you will need a prescription). We are prescribing it because it is the best thing for your pet that has ____ disease. Complain to the company that makes the food if you want to complain about cost.
Again, you can also home cook if it is that important to you (and you have the time!). That is a cheaper but more time-consuming option. A nutritionist at Tennessee can formulate a diet with you and your vet that you can make at home that is balanced.