For the same reason why they passed repeal after repeal of Obamacare: Obama wanted it, and they knew that they could make a completely meaningless gesture and Obama would protect them from the consequences. They could look tough on immigration, appeal to some of their base, and the Dreamers would still be here. Well the time for meaningless gestures is over. Now they're on record, and the record will show most of them voting to let the Dreamers stay.
They're not on the record, and I predict that they WON'T be on the record. They're never going to vote for anything that lets these "Dreamers" stay unless the bill contains some very punitive measures that ends up encouraging a lot of them to go back home.
Two words resonate in the minds of every Republican in Congress:
Eric Cantor