Elected officials, US reps, State reps, Senators, selectmen, usually vote the way their district wants them too. These guys all want to get re-elected, and the way to do that is to vote the way their district wants.
On issues where the the district doesn't care, the rep can vote the way he likes, or trade his vote. On issues where the district cares, the rep has much less freedom. For instance, my district (Northern NH) doesn't care much about Gulf of Mexico oil drilling, immigration, or farm subsidies. This means our US rep, good old Charlie Bass, can, on these issues, trade his vote pretty much at will and we voters back in the district don't care much. On the other hand this district cares a lot about taxes, fuel prices, and jobs. On these issues Charlie has no discretion at all. Should he deviate from the district line, it will cost him in November and he knows it. We all have email and Cornerstone, the Tea Party and a bunch of others make sure we get the word about how Charlie voted on the stuff we care about.
Recently as the US economy has worsened and more voters find them selves out of work, the districts begin to care about a lot of things that they didn't use to give a hoot about. Which restricts the liberty of their reps to wheel and deal. Which makes it harder to get things like tonight's debt limit bill thru the Congress. Speaker Boehner is to be commended for lining up the votes to pass his debt limit hike bill this evening, it must have been hard.