A common populist attitude in American politics is the idea that public service should not pay well. By this view, being a politician shouldn't be about grubby paycheck comparisons, but instead high-minded public virtue. State legislators in Texas make just $7,500 per year, for instance, while those in New Mexico have no salary whatsoever. Last week, this mindset helped kill a bipartisan agreement to give Congress a pay raise for the first time in 10 years.

But this attitude is pernicious and self-defeating. State legislators, members of Congress, and especially their respective staffs not only deserve top-grade salaries, paying them well is a critical foundation for a well-functioning democracy.

First, good pay is critical for average people to even consider the idea of running for office. In the most extreme cases like New Mexico or New Hampshire, it is virtually impossible for a working-class person to dedicate the time and effort necessary to hold office while working some other job to make ends meet. What you tend to get instead is legislatures filled with independently wealthy bankers, boat dealership owners and so on. A legislature that isn't paid is one that tends to be owned outright by the rich.

It's somewhat easier in states where the legislature only meets infrequently, but that also means problems fester for months while the government is out of session. Texas — a state with nearly three times the population of Sweden — only has a sitting government for 140 days every other year (unless the governor calls a special session).

It's even more important to pay staffers well. State-level staff budgets vary widely, but are often quite miserly, and congressional staffers are famously underpaid. Staff assistants, the backbone of both the House and the Senate, make an average of just $33,500, according to Glassdoor, which is less than congressional janitors or parking lot attendants. That is a pittance for a very expensive city like D.C. — and it's much worse for interns, who are mostly not paid at all. All this drastically limits the ability of ordinary people to get a start in public service — something that was common, as Saahil Desai writes, back when interns were paid.

Meager pay also leads to enormous staff turnover. One study found that 46 percent of congressional staffers would look for a new job within a year due to a "desire to earn more money." The result is a government run in large part by inexperienced 20-somethings, most of whom will leave within a few years. Indeed, as Paul Glastris and Haley Sweetland Edwards write, starving congressional staff budgets has been a deliberate Republican strategy going back decades. Without institutional knowledge and a decent career track for its staff, Congress now routinely turns to corporate lobbyists for basic functions like research and writing legislation.

To be sure, actual members of Congress make pretty good money: $174,000. But they also have correspondingly greater expenses, typically needing to maintain two separate residences and frequently travel back and forth between D.C. and their districts. What's more, their pay has been effectively cut through inflation by 16.5 percent since 2009, the last time pay was increased.

But this brings me to a second, more important point: It is critical for legislative pay to be competitive with the private sector. A $174,000 salary is high compared to the average, but it is far, far less than can be made if a member quits and takes up consulting or lobbying. Former legislators and staffers alike are constantly being snapped up by big corporations of all sorts where they can cash in their connections for millions. This provides a huge incentive for politicians to govern in a pro-corporate fashion, so they and their staff can receive what amount to post-service bribes.

Now, as Elizabeth Warren argues, it is high time to drastically tighten up regulations on lobbying and corruption. Banning former members and staffers from lobbying altogether would be a good place to start. And on the other hand, pay at the top of the economic ladder should be drastically reduced by busting up monopolies, jacking up top tax rates, sharply regulating finance, and so on, which would make things more competitive in the other direction.

But even if that happens, it will still be important for a public service career to pay very well. High-paying jobs exert a gravitational pull on society, and moral justifications for taking the money spring up like bindweed. As Anand Giridharadas writes, consulting and financial firms have conducted a decades-long propaganda campaign portraying themselves as places where top graduates can learn important life skills and "make a difference." Many are taken in — just look at the slew of top physicists and mathematicians who have gone to Wall Street instead of doing science.

In other words, public virtue is a collective creation. People are malleable creatures, and zealous morality that can allow someone to turn down millions of dollars in the face of a sustained agitprop offensive is relatively rare. Conversely, a government infested with cynics planning to cash out as soon as possible discourages such people to even try a public service career in the first place. If we want honest politicians and public servants, we need to make that a lucrative choice to make.