They did not make billions from selling yet another opioid of which there are dozens available cheaply. They made billions by subverting the medical system largely though completely legal means. Essentially they sold yet another synthetic street drug through Doctors rather than on street corners. And this worked because they jumped through the correct hoops and advertised in the correct manner.
If they went and produced 'Oxycotin gets you high and it is legal!' like a head shop the operation would have not reached multimillion dollar size before it got cracked down.
Jumping through the hoops is the part the system understands as important though.
Those two differences although irrelevant to end outcome being bad and condemnable are pretty damn big distinctions akin to claiming you "unleashed a savage wolf to attack unsuspecting children" when you sold out a pit bull puppy who was sourced from a dog fighting ring and the dog mauled a kid who yanked on his tail.
The Bastiat quote is on point if your criticism of Purdue Pharma is that it profited from the medical licensing laws and drug prohibition laws that unfairly proscribes teenagers from buying madak cigarettes on the free market.
If the criticism is merely that they made money selling addictive drugs, this really isn't what the quote is about.