On budgetary matters, sure. You want to combine efforts to get legislation through that benefits your constituency even if it's a lot more costly than it would be if you could get your measure approved by itself. An example would be Congressman A has a bunch of people complaining about the all the dangerous intersections in their state, Congressman B has a bunch of bridges that are falling apart, so the two get together and create a Federal Road Improvements Act or whatever to appropriate budget for what is now being considered a nation concern. This is a logical place for riders as it allows federal budgeting to have the greatest reach it can for helping the states.
There is substantially less logical argument when the riders concern law. From your example, if a law ever put a congressman's constituency worse off than they were before, there is no time when that representative should support it. Creating an environment of sweeping bad law into bills set to pass is inherently dangerous because once in place, laws are considered correct until properly invalidated.
But the nature of these riders is different still. This is law being thrown into budget. Just like the super controversial sections in the 2012 NDAA, these are mixing two very different types of bills. Having law riders is dangerous enough as it is, but allowing them to be thrown into budgetary bills that must pass is just insane.
The problem is there is currently no delineation in congress between the two types of bills. Everything they do whether budgetary or policy based is law and is generally "over the head of us simple minded folk" so they have leveraged a tremendous amount of freedom in the way that they can push things through regardless of how much sense anything they do ultimately makes.
I think the first-step solution would be to separate bill types and only allow appropriation riders on budgetary matters and no riders when it comes to new law/policy. If that is too complicated for them, they shouldn't be law makers.
Single-subject rules are adopted in many state, and they are neither complete solutions (viewing substantive subject-mixing as a problem), nor without their own potential problems. (And, anyway, to actually be mandatory, for Congress such a rule would have to be adopted through Constitutional amendment.)
Further, its quite arguable that substantive subject mixing is not a problem, poor representation is, and trying to limit substantive subject mixing just creates a new problem; where reps are effectively representing the interests of their district, why shouldn't they be able to effectively legislate based on considerations like:
1. X, considered alone, is better for those I represent, on balance, than not-X, and should be supported, and
2. Y, considered alone, is worse for those I represent, on balance, than not-Y, and should be opposed, but
3. X with Y, considered together, is better for those I represent than not-X with not-Y, thus, the combination of X and Y should be supported if X cannot be secured alone.
(While other representatives, with different constituents with different interests, see the same thing, but with X and Y reversed?)
If you could effectively prohibit subject mixing, that would prohibit compromises that are net gains for larger groups, even if smaller gains for the most-favored groups.
(Systems with parliamentary government with explicit coalition building essentially do massive subject mixing up-front in deciding the agenda of the coalition government when it is formed, and thus can avoid the need to do subject mixing when it comes to individual bills; the U.S. system works more on ad hoc coalition building, so the compromises are more on individual bills than anything analogous to the formation of a government in a parliamentary system.)