A lot of illegal weed is from the same supply chain as the legal stuff, but unreported, similar to bootleg products that are sourced from the same factories as the authentic stuff.
I do agree that it's a problem not knowing where it came from, but it seems that legal weed has really raised the bar, and the street has to compete at some level. I've heard street weed is a lot higher quality now than pre-legal weed.
The illegal businesses are probably still evading personal income tax, payroll tax, corporate income tax, sales tax. In addition to the pesticide stuff you mention.
The rest is state regulations. The laws are as onerous as having to tag and register each plant, what happened to it, their weight at harvest, and sometimes genetic testing of those plants.
The idea is to create a paper trail such that illegally grown weed can't be laundered into being legal-- but my god is it a MESS.
I've always preferred to pay the higher prices for this reason, and the fact that I know exactly how potent something is.
So I'm going to work blue here for a bit...
Regarding contamination and unsafe drugs-- my best friend and I had a tradition. Once a year around the end of the year, we'd get a couple grams of cocaine and go to someplace fantastic like the Queen Mary, or Disneyland, or the Long Beach Aquarium, The San Diego Zoo, etc. We called this tradition "Merry Cokemass". We had an agreement to never do any drugs outside of these appointed 24 hours.
Anyways, we have both decided that this just isn't safe anymore.
My read on the situation is... Government wants to tax the weed and ensure its safe. So there are a ton of regulations which require you to do a lot of extra work and are expensive.
That, along with the taxes creates a huge price differential between legal and illegal weed.
I thought it was all about taxes at first, but I've come to understand that illegal growers often use toxic pesticides that further increase yield-- and thus it is important to know where your weed comes from.