Congress took up the issue of comprehensive immigration reform (which included protection for Dreamers) and the Senate, with bi-partisan support, passed it. The House Republicans sat on the bill and would not allow it to come to a vote.  Congress failed, President Obama acted - and it allowed Dreamers to stay and flourish.  He knew it would be gone if Trump one but I think he was hoping to stave it off until congress gets their stuff together and allows Dreamers to become citizens.  We will see what happens.