And it worked out spectacularly well for them: they got everything they wanted out of the standoff. This could prove to be a real watershed moment.
First, Mitch McConnell is a long-time skeptic about government shutdowns, believing they are far more likely to hurt than help the fortunes of those who instigate them (typically, Republicans). Like most Republicans, he has become cowed by Trump. Now, Trump’s strategy has blown up. This is likely to cause McConnell revert to old form on shutdowns, and smack down any future talk from Trump about such things. And McConnell has the power to smack such talk down, hard: threaten to pass a bipartisan CR with a veto-proof majority. Give Trump the choice between the humiliation of backing down and signing or the greater humiliation of a veto override. Or, more likely: backing down, hushing up the private conversation in which the threat was made, and publicly professing support for the CR. (In fact, exactly such a scenario might have been what prompted Trump to cave today.)
Second, assume an alternate history in which the Democrats caved. Trump would have been rewarded for his bluster. He has just learned by experience that he has an ace up his sleeve by which to cow Pelosi into obeying his will. What are the odds he’d continue to play that particular card? Near certain, of course. Democrats would then lurch from defeat to bitter defeat. Result: dispirited Democrats and a rejuvenated and Trumpier-than-ever GOP. This would pave the way not only for a long series of legislative defeats, but for a defeat in 2020. (Why, after all, should voters support a party that is repeatedly demonstrating the depths of its own craven ineptitude?)
This time, thankfully, the wise choice was made.