Ask Paul Ryan. That was his bill. Trump was unwise to get behind it; if Trump wants to see who made a fool out of him, he can look in the mirror.
The GOP let Trump down. The HFC voted overwhelmingly twice (with a few exceptions) to make Ryan the Speaker.