Lets take child porn as a case study. In NZ if someone sends you a picture of a naked child that is x rated and you haven't even looked at it you can be prosecuted for having child porn on your phone/pc/letterbox. Extrapolate that out If you run a child porn website and have a backup on your pc, or images ready to upload on your pc, or even a cache in your temp internet files you can be prosecuted So lets say you have a website promoting hate crimes You have a server somewhere safe and all the money is tied up neatly but you have a draft article on your server ready for it's final edit You've just created the link to the site and if there are local laws against inciting hate crimes you can still be prosecuted Why not save yourself a ton of mental energy and focus on the good and legal and leave the dark, ugly stuff to the ugly people.
There are actually countries that legalize the use of weeds, for they are originally used for medicinal purposes.
No one is talking about Google suing - it's more likely to be a Government. And don't count being out of the country to keep you safe. Kim Dotcom is in a world of trouble, no matter what he says, because the FBI is after him.
It is probably just like one of the reasons that the Pirate Bay continues to operate everywhere without issue – because it is hosting information where it is not illegal. Also, remember that freedom of speech is a big thing in the US…you cannot necessarily directly advocate for something illegal, but that does not mean that you cannot write about it.
Getting back to the OP's original question: the reason that some "illegal" websites are still in business is probably because a., they have not been caught yet or b., they have figured out a way to "walk the fine line" between legal and illegal for now. Because they may get caught at any minute or because the "fine line" will be moved (governments change their rules all of the time) @sarahk poses the correct question about saving yourself a lot of heartache and worry by staying away from questionable websites and/or business practices. There is no longterm future in the dark, gray world of illegality or semi-legality so investing any time or effort into it is a short-term, misguided strategy that will likely cause much pain in the future. Do not envy these shady web businesses; pity them, for they know not what is likely to befall them in the future.
Some websites like Megaupload clearly had the intent of having people put up illegal content for others to download. They were making a lot of money off their business. While other sites like 4shared does have some illegal content, I don't believe their profit making on illegal content was to the extent of Megaupload. I think that there is a lot of politics involved behind this but this is just factor that might have contributed.