That is not always a correct assumption. Due to the way some programs like Medicare pay out, doctors are sometimes strongly incentivized to prescribe the most expensive drug.
Ophthalmologists are the usual notorious example, prescribing for macular degeneration. Medicare's reimbursement for drugs administered in-office includes paying the cost of the drug plus an additional percentage.
For macular degeneration, research showed Avastin and Lucentis are basically equally effective. But Avastin is ~$50/dose and Lucentis is ~$2,000/dose. If you're going to get a "bonus" payment equal to a percentage of the cost of the drug, which one would you use?
Lucentis has at times accounted for 10% of the entire Medicare part B drug budget because of this.
My comment was based on the more typical situation, where the physician sends the patient to a pharmacist.
Giving the same (high?) standard of care to patients without regard to their financial resources.
You are correct - in cases where there is a brand-name version of a dug AND also a generic version of the same drug, the generic is usually provided unless the brand-name is specifically requested.
But, the parent post is describing cases where there is a new, brand-name drug that fills the same niche as an existing generic. Two different drugs, but often only slightly differing results. MDs often prescribe the newest, assuming it's better than the generic. MDs receive much of their ongoing education about drugs from the pharmaceutical sales reps, so they are bombarded with ads and samples (just as consumers are with ads on TV).
As an aside, my dermatologist has been good about ensuring the costs of any treatments I receive are managed. She's recommended specific pharmacies, brand-name vs generic, and other tips/tricks to reduce the costs. This despite the fact that I don't directly bear any of the costs because I have a decent medical plan.