The Democrats were worried about losing leverage on immigration if they let this bill through but it was only a short-term thing so I don't think it would have hurt them that much. So yes, I think they should have passed the bill to keep the govt going.
On the flip side, Trump rejected a bipartisan immigration bill. Had he supported that we might be in a different place. I don't know how the rest of Congress would have viewed that compromise but it never got very far because Trump turned it down. It seemed like a decent compromise so I'm not sure why he rejected it.
EDIT: Now I remember. He rejected it because there were too many people from 'shithole' countries coming in. Not enough Norwegians.
lain: