People often overlook that "legal" doesn't necessarily mean, for example, you can just open a shop and start selling magic mushrooms. "Legal" covers all of your above options. Alcohol is legal, but it's heavily licensed, taxed and restricted. In some countries (Scandinavian in particular), you can only buy booze from government kiosks. Similarly, DXM cough syrup is legal, but you'll find it difficult to "legally" walk into a pharmacy and buy enough for you and a friend to get high. Many prescription drugs are legal, but yeah, you need a medical doctor to approve your use of them.
The fact that certain substances are illegal and classified as dangerous and/or useless for medical purposes is another ramification regardless of your ability to go purchase X drug or item. There are "legal" substances that are dangerous (but not fun) that are widely studied, bought and used - for example, cyanide. Saying "magic mushrooms are illegal and you can't study them with science" because they're fun is, by comparison, kind of mad.
Anyway, I'm sure none of you needed pharmacies, prescriptions or off-license booze shops explaining to you, but there's nuance to the legal status of a substance beyond "it's banned" vs "you can go buy it in a shop right now" that some people can miss when you bring up the topic.