Because arguably, the reason you shouldn't put these substances in your body is because doing so can be unhealthy. Criminal charges and prison are definitely unhealthy.
Making a person's diet a matter of law just goes against the values of many people. I'm well aware of the fact that some compounds lend themselves to addiction/habituation but so do many legal ones. You don't see people throwing winos and pack-a-day smokers in prison unless they otherwise break the law in a way that infringes the rights of someone else.
Likewise, if someone fails to use intoxicants or other recreational drugs responsibly and develops a debilitating habit, it makes more sense to do as we do for people who want to quit drinking or smoking, not as we do for people who rape and murder.