It was the Dems doing what they had to do to move on their agenda while they could and, again, most of the provisions in the Inflation Reduction Act positively impact the GOP's constituents, unless of course they don't benefit from cleaner air and lower costs for meds.
The wisdom of it seems to be borne out by the midterm results.