Fortunately, not all judges think that way (although I suspect that most do). There was a case rather recently in which a judge ruled that a law was unconstitutional. It was a criminal case and, IIRC, the state appealed and the appeals court sent it back to the lower court with the admonition that judges aren't supposed to find laws unconstitutional "if they can be saved."
So the judge wrote a new ruling, essentially thanking the appeals court for the reminder and then writing a lengthy treatise on why the law could not be saved -- and then restating his decision that the law was unconstitutional.