National opinion polls may have been against the bank bailouts, but national public opinion is not what really matters to a politician. Representatives are accountable only to their own districts. Of course, this is why we see pork barrel spending even though everyone hates it. People usually like their rep and hate most of the others around the country. If the representative can pump enough cash into their district, voters in their district will overlook a voting record they mildly disagree with. Many representatives probably saw the bank bailouts as some combination of necessary for the country and a chance to appease their financial backers, offering a favorable trade-off in terms of displeasing their constituents.
I'm not sure about this. EESA passed with an overwhelming majority after an overwhelming (and fairly vocal) majority of American voters opposed it.