I'm gonna take a slightly different stance from what most people here seemed to take. I'm gonna go ahead and say that it's not a question of why marijuana is illegal but why tobacco/alcohol are legal, since everyone always throws those around as examples.
Tobacco is extremely deeply rooted in both American and western culture. And really, in the culture of almost every country on earth. Trying to outlaw tobacco in the same way that weed is outlawed would be similar to outlawing flip flops or ironic t-shirts. It's too strong a force as is, and the tobacco industry has gotten to the point where it has enough money to seriously lobby Congress, so there's not a real chance of it being outlawed at any point in the forseeable future. As for alcohol, same deal, but infinitely larger extent. Nearly every single person in America will have had alcohol by the time they're reasonably old (thirties or forties). Lots of them will drink semi-regularly--with meals, at parties, what have you. Further, alcohol is extremely deeply rooted in ALL human cultures. Outlawing alcohol would be like trying to outlaw cars or iPods. Since something like everyone (spot the hyperbole!) over 21 and a shitload of people under 21 drink, there simply no way to enforce something like that. If nearly the whole population ups and refuses to obey a law, you can't really enforce it. Especially not in a country as populous and physically large as America.
Were it not for those things, I think that at least tobacco would be illegal. Hell, it probably would be illegal were it not for the lobbyists alone. Alcohol I can't be so sure of. But, those things seem to me to be the only reason that people ever even bring up "why is marijuana illegal when tobacco and alcohol aren't." I'd say it's as simple as being so deeply ingrained in our culture, which marijuana is not.
Also, people saying "marijuana is good for you" and so on: yes, it has had many demonstrated medicinal uses and has many chemicals naturally found in the plant that are of great utility. BUT, something like all the people (spot the not-quite-as-big hyperbole!) who recreationally take marijuana smoke it. It doesn't matter what you're smoking--it could be the cure for fucking lung cancer--you still risk getting things like lung cancer and mouth cancer and throat cancer, because surprise, inhaling smoke is fucking stupid. Yes, there are some people who consume it in other ways that don't damage your health, but people overlook the fact that yes, in theory, marijuana is great for you. It has all the benefits. But in practice, just about everyone smokes it, so that's all null and void. Legalization would mean more and more people would get their fix via smoking it, rather than other means, which would completely negate the health benefits point.