According to Kant, certain principles are ethically right and must not be violated: they are social necessities. To Kant, honesty is one of the virtues that falls into this ethical category of an imperative: it must be upheld at all times. Without such categorical imperatives, society, according to Kant, eventually erodes and falls apart. Therefore, we have to avoid lying, no matter what. We cannot simply look to the benefits that telling a lie might hold. Even if it hurts us, we have to be truthful for society to hold together.
If we only tell the truth when it is prudent (i.e., when we think ahead to what the end result will be and decide it is desirable), it becomes far too easy for people to tell lies, justifying it as serving the greater good. Eventually, lying becomes so widespread and it becomes so easy to rationalize a lie that social trust is eroded. If anyone can be lying at any time, whom can we trust? What use is a promise if we can't believe in it?
We can see the results of this in the compromised political system in the United States, where the default position taken to the utterances of most politicians is that they will tell any lie to get elected. Politicians sometimes justify this by insisting that their election is far more important than allowing the other candidate to win, because of everything noxious his or her party stands for. They are saying it is prudent to lie to get elected. This has eroded social bonds and the social contract in America, which is not good for our democracy.
There are problems with Kantian ethics: for example, do you tell the truth when a Nazi stormtrooper comes to your house asking for the Jews you are hiding? Kantian ethics say yes, which most people would disagree with. (Of course, in a Kantian world, a liar like Hitler would never get elected in the first place.) Nevertheless, the fundamental principle that certain ethics are worth the pain of individual suffering to keep in place is a sound one.