Nearly 20 years ago I had a young man present with a fractured a rib from a fall. I noted aloud the codeine allergy "documented" in his chart when I had first seen him 3+ years prior. I've never forgotten his response.
"Doc, I'm not allergic to codeine. I used to say that when I was still doing drugs so I could get Vicoden instead. We'd take 6 or 8 Vicoden at a time to get high, when I tried that with codeine, I'd just throw it up".
Drugs within the same class may (or may not) have significant differences in side effects (as above), intended pharmacologic effects(ditto) and cost. These differences are exploited by every player in the medical care bazaar.
My patient exploited differing intended and unintended side effects of two narcotics.
Drug reps exploit the most miniscule distinction to try to sell me on a product while talking down price disparity.
Insurance companies force choices due to cost while ignoring other considerations, regarding generic (same chemical) and same class (similar chemicals) as synonyms.
Recently I had a patient's spouse who explicitly adopted the latter view and was angry when I tried to explain the distinctions between one of his meds and her proposed substitute. "They're the same, there's no difference, they're in the same class".
The medicrats are smiling.