The point for security is that right now, the major cash crop for gangs and cartels is marijuana. Just like Alcohol and Al Capone during prohibition, they had so much money it was hard to fight a war against them. Instead we legalized alcohol and shut them down for tax evasion.
If we legalize marijuana, the black market profit margin goes away, so theres no incentive for them to do it. They lose a huge amount of their income, and as a result have many less resources to fight against law enforcement. Cause -> Effect. You give stoners the option to go to a legal store and buy from a trusted brand instead of deal with some shady dealer, and they will. The black market only exists because the government imposes restrictions on things the public uses, you undo the restriction, you destroy the black market.