The notion that people are perfectly free and rational entities is a dangerous fallacy. People don't have perfect information, they don't make perfect decisions, and if there's something the government can do that improves the lives of many while inconveniencing few, then it's absolutely the government's job.
There exist substances which will get you addicted instantly. Do these have any place in a free market? Where does the rational "value equation" come in to that?
Perfect Information is what the government needs to guarantee and regulate, not morality. Apps need to be transparent and honest and substances need accurate labeling and purity from contaminants. Heroin is a one-way ticket to pain and degeneracy and everyone in the Western world knows this; it's a terrible value that generally only appeals to someone who's already hooked on opiates.