Why do some claim that judges “legislate from the bench?”

Usually when a court rules that a law some people like is unconstitutional, the law's proponents say the court is "legislating from the bench", usurping a job left to the legislative branch. If they don't like the law and it's ruled unconstitutional, the justices are just doing their job.

There are instances where the courts do make political decisions, as in the Voting Rights Act, saying they were no longer needed although the Congress had extended the law. That is, in fact, legislating from the bench, since there was no constitutional issue involved.