The problem was that is that the Republican caucus so divided, its members had to work with Democrats to get the bill passed.
This afforded the Democrats the ability to achieve several of their main objectives such as more domestic spending, money for Affordable Care Act subsidies, funding for Planned Parenthood, no cuts for scientific research, and minimal cuts to the the EPA. In addition there were no reductions in funding to “sanctuary cities.” and no funding for Trump's boarder wall between the US and Mexico.
While the deal does contain funding for military spending and border security the Democrats looked upon the spending bill as a win considering that they are presently the minority in all three branches of the government.
Trump, however, was outraged by the media's consensus that the Democrats might have gotten the better of the deal (which they did).
This conclusion by the media caused Trump to go off on a Twitter tantrum claiming it was the Senate rules that require a 60 vote supermajority to approve most major legislation that cost him all the parts of the bill he wanted.
In Trump's tiny mind the solution is to either elect more Republican senators in the 2018 midterms, “or change the rules" by doing away with the filibuster as they did in the Supreme Court vote...
In addition to his petulant tweets Trump also sent out his Office of Management and Budget director Mick Mulvaney inform reporters that Trump was furious about the Democrats behavior and that Washington might need a shutdown.
During the briefing Mulvaney accused Democrats of trying to make Trump "look bad"...
“I think the president is frustrated with the fact that he negotiated in good faith with the Democrats and they went out to try and spike the football and make him look bad. And I get that frustration, ‘cause I think it’s a terrible posture for the Democrats to take. If we’re sitting here and trying to prove to people that Washington is going to be different, that we’re going to change things, that we’re actually gonna figure out a way to work with them, and they do that to this president, listen I would’ve taken offense to that. It doesn’t surprise me at all that his frustrations were manifested in that way.”
Trump's childish behavior is an obvious reaction to the debunking of the much touted myth of his legendary negotiating skills and ability to cut deals. But as his time in office wears on it has become abundantly clear that his deal making abilities are indeed nothing more than that... a myth.