Note: misconceptions/challenged statements from a previous edit are struck through viz. insight from an answer.
There's been a campaign for US federal prison reform for decades. It's long had a lot of support, but not the level of bipartisan support among politicians we've recently seen. Whether you want to attribute past objections to such reforms to a genuine belief in the importance of long punitive sentences or the cynical effects of lobbying from for-profit prisons, the fact is politicians have often voiced such objections. It's understandable, given the popularity of "tough on crime" policies with voters in many elections.
But the House and Senate versions were respectively passed 360-59 and 87-12; and while the conciliatory vote might not be such a landslide, major legislation rarely attracts such near-universal support. Nor is the bill above any criticism outside of Washington. For example, penologists regard the bill's rehabilitation as less effective in crime reduction than incapacitation.
So why is the act so widely accepted among politicians in both parties, regardless of house? Perhaps prison reform always was, but it never seemed it. I've read this may have been a long time coming more due to Mitch McConnell trying to block a vote on this issue rather than Republicans finally supporting it enough to pass, but even if that's true it leaves such support unexplained.