At first glance, you would think that the chief executives of taxophobic U.S. corporations and our less-than-stellar leaders in Washington have nothing in common. But you’d be wrong. What they share is a lack of shame and an excess of narrow thinking.

The similarity between C-suite tax avoiders and Washington reality avoiders struck me as I watched the debt-ceiling and government-shutdown debacle unfold. Listening to politicians say, “This is what voters in my district want,” reminded me of watching Apple chief executive Tim Cook invoke “shareholder value” during his May testimony at a Senate hearing that focused on the extraordinary games that Apple plays to avoid paying U.S. taxes on what anyone other than a tax lawyer would consider U.S. income. Not only was Cook not visibly embarrassed but he actually seemed proud of what the company was doing.

Pols and CEOs both justify their actions by citing obligations to their narrow constituencies. What about the fact that all Americans, conservative and liberal alike, would realize long-term benefits from having a functional government with predictable finances? Or the fact that shareholders would ultimately realize serious value from an increase in our nation’s well-being if big-time corporate tax avoiders decided they had an obligation to help pay for public education and infrastructure? Well, that’s when people trot out the John Maynard Keynes line, “In the long run, we are all dead.”

Look, it’s easy to understand why companies (perfectly legally) avoid taxes. Lower taxes mean higher profits, which presumably translate into higher stock prices. However, going to extraordinary lengths to avoid taxes helps undermine companies’ long-term interests by hurting society and by giving average people yet another reason to detest Big Business.

It’s also easy to understand why politicians would rather pander to their constituents than act in the national interest. It’s safer. If you’re a tea party type who compromises or a liberal who tells Social Security recipients that the program in its current form is unsustainable, you risk losing your job.

I have a belief, possibly naive, that when you’re entrusted with corporate or political leadership, you’re supposed to lead rather than stick your finger in the air, divine the prevailing wind and follow it. But maybe that’s just me.

However, I actually see a few glimmers of hope. Some of the fanatics who caused the government shutdown and fomented the debt-ceiling crisis are catching heat for having damaged conservatives’ long-term interests. Which, in fact, they did. And I’ve even seen a company do the right thing because it was embarrassed. Not in the United States, but in England, where an uproar erupted last year after a superb series by Reuters about the tax-avoidance games played by Starbucks, which, Reuters reported, told shareholders it was making big profits in England but filed U.K. tax returns showing losses. My favorite part was Starbucks U.K. buying coffee beans from a Swiss affiliate that benefited from an agricultural tax break.

As a result of the blowback, Starbucks paid £10 million pounds (about $16 million) of U.K. taxes voluntarily. Hello? What’s going on? I asked Starbucks why it was voluntarily paying taxes. The answer, from Corey duBrowa, Starbucks’ senior vice president for global communications: “We believe that acting responsibly makes good business sense, and the payment of corporate tax in the U.K. is a good example of this ethos in action.”

Alas, two other U.S. companies harpooned by Reuters — Google and Amazon (whose founder, Jeff Bezos, owns The Washington Post) — felt no obligation to do anything. But Starbucks’ deciding that it’s good business to pay taxes is really encouraging. So is the intra-conservative debate between pragmatists and fanatics. Liberals may be next. If we get lucky, shame and political compromise may yet become trendy. 

Sloan is Fortune magazine’s senior editor at large.