Its not the patients that lobbies for these laws...it is the insurers, and its to lower their costs.
Its also why the insurers pay the pharmacists a bonus for these changes, if it was about costs to the patient, the bonuses (money back) would go to the patient.
I mean, no, patients don't lobby for them because patients don't really lobby en masse for healthcare policy in general, but patients definitely are the ones who benefit from them.
There are some cases where the relationship between insurers and patients is adversarial. This is not one of them.
See Medicare for All.
Well imagine your doctor gives you a Rx, you go to fill and the insurer tells the pharmacist to ask doctor to change it. If the doctor disagrees (for whatever reason) the insurer may drop your doctor from their network, then you will be stuck going to a doctor who does whatever the insurer asks.
If you feel there is no conflict there or that isn't adversarial that is fine...in my experience both patients who lose their doctor and the doctors themselves disagree.
In most states, the law explicitly requires the pharmacist to fill a prescription with a generic (if available) unless the doctor specifically writes "dispense as written". Not allows - requires.
The purpose of these laws is to protect patients - in the overwhelming majority of cases, the generic and brand name drugs are equivalent for patients, so patients save money by purchasing the generic medication even if the physician prescribed the drug using its more well-known name (the brand name).