Opium farming is big in Afghanistan, and there has been a big effort to fight it. This article makes it clear that Afghan farmers are plenty rational; when the government drives up the costs of farming opium by specifically destroying opium crops, they substitute other crops. In this case, they have substituted Marijuana:

As Afghanistan struggles to cut its raging opium production, aid workers try to find alternative crops, but for some former poppy farmers the choice was easy — they planted marijuana instead.

The article also makes it clear why:

Marijuana, while not as profitable as opium, still makes more money than other legal crops.

This should not really have been unexpected