The Court is empowered to throw out unconstitutional legislation. It is not empowered to throw out Constitutional legislation that happens to be a bad idea.
[1] On everything from campaign finance to drone strikes, nobody bothers drawing the very important distinction between "bad idea" and "unconstitutional."