This Congress is one where you certainly can't just add up the Ds on one side and the Rs on the other and expect to have a picture of how votes will go down. Both parties are experiencing significant fracturing internally. Republicans are fracturing along social conservative, fiscal don't-really-care vs. fiscal conservative, social don't-really-care and Democrats are splitting along moderates vs. hard-left lines, and on both sides the non-ideologues are all finger-to-the-wind trying to figure out which side will get them more votes next election. Expect more chaos from those folk over the next few weeks/months.
A lot of the political hatin' going on lately is predicated on very simplified propaganda-based models of what is actually going on lately; does the idea that the Tea Party and the Democrats could actually agree on some points like this blow your mind, or was it obvious to you in advance this could happen? If the former your models need tweaking, this outcome should not have been a surprise to anyone who was paying attention.