Robert Clark, in his book Cannabis: Evolution and Ethnobotany, speculates that Cannabis was one of the first cultivated plants by humans because of its versatility: fiber, oil, seed protein, psychoactive and medicinal uses. Farming started around 10,000 years ago and Clark figures that Cannabis has been with us since around that time as a cultivated plant (seeds taken with humans during migration spread it), but that before agriculture, the hunter/gatherers were using it as early as 50,000 yrs ago. So it's humans' best friend in the plant world.