They get paid in lower risk deductibles. If a patient demands a drug they saw on commercials, the doctor can reduce liability by prescribing it in many cases.
It’s certainly not enough of an effect that doctors make decisions on what to prescribe based on their malpractice insurance premiums.
There are no healthy habit recommendations anymore in many practices due to anti shame culture etc.
This is different to other parts of the world with healthier citizens.
Doctors are humans though and if people repeatedly ask for a specific treatment some percentage of them will offer it. That’s how drug advertising impacts prescriptions. Nothing to do with liability.