Good point, it's an issue of optics really, regardless of the actual costs involved.
It's certainly not the drug itself that is so expensive; the unit cost of an individual dose of any of the common opiates, when purchased through a pharmaceutical channel, is going to be less than a rounding error.