The Dems play the long game. They knew they would take losses due to ramming through Obamacare. Maybe not losses of this magnitude, but they certainly knew there would be casualties and they are willing to take the hits to advance socialism.
If OCare is allowed to survive, it will have been worth it for the Dims. Dumb LIVs have a short memory and once the Dims start winning again, they can resume the forward march of socialism.
Yes, they are ideologues, who have a long term agenda.