I also don’t know, but I seriously doubt there was cost benefit analysis.
My two bets would be:
- church/priests had power and they condemned most things, except for preying.
- it became widely known that opium is really obviously bad for you, after a bit of mental juggling that became “drugs are bad”, and then wholesale bans followed.