It's because Congress doesn't have a single subject rule.
43 states have it.
https://en.m.wikipedia.org/wiki/Single-subject_rule
E: There are some good reasons why Congress doesn't have it. First, Congress does soooooo much stuff that it might be utterly impossible to do it one subject at a time. That's why we have omnibus bills for things such as spending, which includes the budgets of all or most federal departments. Along with reconciliation and appropriations bills, it's how a lot of business gets done and how compromises are made. A single subject rule would clear up a lot of the pork, but night just grind things to a hault just by the shear number of bills that would have to be written, debated, and voted.
Another reason is that it opens a whole new category of litigation as to whether or not the title of the bill matches the subject of the bill; the standard is one of whether the title alone would give fair notice as to the range of subject matter in the bill.