Legal gray area. They could have waited years and years and tried to get laws passed to allow their business to function with a clean slate of legality, but bureaucrats would have never allowed it.
Kim Dotcom made the mistake of not knowing when to quit. Napster shut down when it got told to shut down. Megaupload hopped around hoping to outsmart the law after it was told to shut down, and the executive branch doesn't let that go.