Inefficiency stems from having to operate covertly. The precautions required to evade detection make the production of drugs very labor intensive. Grocery-store cashiers, for instance, are more than 100 times as productive as retail drug sellers in terms of items sold per labor hour. Similarly, hired hands working for crack dealers can fill about 100 vials per hour, whereas even older-model sugar-packing machines can fill between 500 and 1,000 sugar packets per minute. This labor intensity of drug production, combined with the high wages demanded for that labor, are what drive up the costs of drugs; by comparison, materials and supplies — glassine bags, gram balances, and even guns — are relatively cheap.
For the rest of the story: http://andrewsullivan.thedailybeast.com/2012/12/why-illegal-drugs-cost-so-much.html