They did NOT have the votes to override his veto.
Because the Dems want to bleed out the GOP in a shut down. After a few weeks of chaotic GOP Civl War no doubt the Dems would have supplied the votes for a new bill. An even worse bill most likely.
You're right - the next one would have been worse.