That sounds nice and easy until you start thinking about it for any length of time. The biggest problem might be who gets to decide what is illegal. This needs to be figured out in both a theoretical and practical sense.
On the theoretical side does Twitter allow Holocaust denial which is legal in the US but illegal in much of Europe? Does the US get to impose its views of free speech on the world? Does every jurisdiction get a different version of the site?
On the practical side, what happens when the legality of something is up for debate? Maybe an image is revenge porn or maybe it is perfectly legal porn. Maybe a movie clip is a copyright violation and maybe it is fair use. Does Twitter take down that content as soon as there is a complaint? Does it have to wait for some legal action to start or finish? What is the recourse if something is taken down and later found to be legal content?