Why not ban nicotine, by the same logic as heroin?
The key difference is that nicotine is a mere stimulant, while heroin alters your perception, it literally changes the way you see good and bad, because it's the ultimate feel-good substance. I have zero qualms about legalizing LSD, psilocybin, ketamine, etc. Likely even cocaine. But legalization of opioids would require a lot of preliminary work, to somehow allow the addicts function in a socially compatible way when badly wanting a dose.
It must be noted that a physiological addiction to opiates does not form from a first dose, and not even from the first ten doses, so infrequent recreational use is possible, given a right psychological preparation. This is similar to alcohol.
because nicotine doesn't increase crime rates on society.