Well, of course it is. It is their only (or one of their only) cash crops. The USA and the West are the major users of heroin.
Why grow food to feed Afghanistan when the Afghan owners of those poppy fields can get even richer by supplying the West with heroin?
Greed.
No Blood for Opium. US Out of Afghanistan.