It's been said, but any strain of cannabis has the potential to be a good quality smoke. There is no such thing as shagg plants. Shagg or shitty weed happens when it was grown, or stored improperly, examples would be not weeding out the males when female plants are growing (seeded buds), or the buds were not properly dried and stored (mold, harsh smoke), or the plants were picked too soon, or too late (green taste, harsh smoke).

Lets say someone has a high quality strain like White Rhino (22% THC content) and a lower cost seed from Nirvana like Ice or something. The person with the White Rhino and the person who grows it incorrectly, can turn out to be shagg, while the person with Nirvana, grows it properly and gets a potent smoke. It all depends on how much care the grower puts into growing/storing the cannabis.

I have seen some people save seeds from the shittiest, most seeded pot you could find, grow the seed out, and the outcome is usually, if grown properly, is an amazing smoke.

Dealers keep selling grams for $20-$30 because people keep on buying it. If people were to stop buying it, then they'd have no choice but to lower the overall cost. It's still there because people keep going back and letting themselves continue to get ripped off. It's not the dealers fault, it's the fault of the people choosing to pay that much.