I've thought about this many times.
The Prime Directive is Star Fleet General Order #1.
But not everybody is in Star Fleet.
You've got civilian folks like Cyrano Jones and Harry Mudd. They can go about mucking up all kinds of planets, either through malice or ignorance.
Also Orions and Ferengi, doing their thing. And then the aggressive empires, Romulans, Klingons, who will put their own interests ahead of any given new world.
Just because Star Fleet puts the Prime Directive at the top of its list, not everyone else does. How could they stop the galactic interference?