That's not how legalized Marijuana works.
When you go to a dispensary to buy marijuana, the owner of the store is not buying dirt weed that some gang member grew in his backyard.
Do you realize how difficult it is to get a license to sell/grow/transport marijuana in a legalized state? Every step of the way, from seed to sale, is controlled. You can't just open a store and sell weed that you obtain from the street. You are forced to go through a licensed distributor, who himself is subject to the same controls and cannot buy weed from some ragtag guy with a couple hydroponic buckets in his garage. He has to buy from a licensed grower, who also has to jump through insane hoops just to operate.
Most of these people are not going to be stupid enough to risk the literal hundreds of thousands of dollars it takes just to get licensed and be able to operate a business by buying weed under the table from gang members.
Trust me, there are A LOT of things to complain about when it comes to legalized marijuana, but this (gangs involved in the business) is not one of them. For one, given it's weight to profit ratio and how difficult it is to smuggle (smell, bulky), most gangs go for far more lucrative drugs like heroin, cocaine, pills, or meth. That shit grown on some field in Mexico, when compared to high THC hydroponic strains like in CA, leaves almost no market for Mexican grown weed that might be coming over in bulk.