What happens is the Dims write something into a bill that helps them get re-elected,in exchange for them signing on to the bill the Dims are pushing.
Sometimes,to sweeten and seal the bill,the Dims will back off a hair or two on something they either didn't really care that much about anyway,or that they know they can get passed later on,and this "sweetens" the bill so the alleged Republicans can justify signing it.
And sometimes,some RARE times,one bill will be joined at the hip by one even worse than the first one,and the Dims will promise to drop the worse one that they never really expected to get passed anyhow,in exchange for a vote on the original bill.