With modern technology, trace ability and all that is really not that expensive for commodities. Returning to the topic, it would be predictable if OPs re-invention of the concept of generic drugs were maybe 1/10th the price of name brand. Oddly enough that's not unusual for generic pharma to be shockingly cheaper than name brand. The real question is why aren't generic overdose drugs incredibly cheap? I would guess profiteering, but who knows. Maybe they're not shelf stable, perhaps extremely temp or UV sensitive?
So, yes, there always is some reason. The pharma company needs to cover the costs to their whole business with the revenues from their whole business, and they'll play whatever games help them do that. The price for a drug does not correspond to the cost to produce (or develop or get approval for) that particular drug, the price corresponds to maximum revenue for that drug.
With all the max revenue from all drugs, they need to cover research for a bunch of drugs that won't work out, marketing, board of directors, and other expensive hires to power the rotating door between regulation and industry, etc.
It would obviously be better if prices paid for long-existing well-known drugs did not mostly go to cover inept big-business shenanigans. "Real competition" would fix this, but the health care industry is fucked up in 10 different ways and we can't agree which direction to go to fix it. (In this case I'd say the problem is that the end-user is not paying for it, so bureaucracy and politics decide how much of which brand to buy, and the result is so bad the end-user would never pay for it, so we're stuck - it's unfixable.)
Except for biologics, many drugs are not that expensive to manufacture. The cost is in proving they will do what they say they do on the package.