Believe it or not, I can imagine a drug being worth 4k$ for 30 pills. When you synthesize these designer drugs, you sometimes have to go through upwords of 20+ reactions, and in the end you get around 3% of the material you started with (and that's on the good side). So you need to start with a lot of material, to which most will go to waste. Not only that, some of the reagents themselves to do the reactions needed are extremely expensive. In particular if you need chiral organometallic catalysts. It adds up fast.