The Space Pirates aren't the only major force out there. The Kriken Empire and several other groups have been attacking the Federation relentlessly. It's actually why a lot of groups support militarizing the Federation, and why active assaults against the Pirates are actually kinda rare and why the Pirates basically can subsist on so many raids. The Kriken Empire is in fact actively hated by the Pirates, and by many races in the cosmos. Mostly because they're basically a ruthless expansionist empire who's entire clan-based culture is based around sending their youth out on pilgrimages to search for worlds to conquer. Their entire combat style is actively based on stealth and sniping with high-powered lasers, which makes them a pain to deal with.
However, unlike the Pirates they're active conquerors and genocidal so they tend to keep territory rather than vanishing after an attack. They also lack the mad ingenuity of the Pirates. This means they aren't really prepared for the Federation's "We don't fuck around" policy and lacked the ability to really recover from losses despite being rather good at biotechnology, which is why by Metroid 2 they've basically been shit-stomped into the ground so hard that the only real threats to Galactic peace are the Pirates rebuilding (which Pirates are really damn good at doing) and the Metroids.