Logrolling
The political tactic you are focused on is called, in neutral terms, "logrolling", and more colloquially, "horse trading" (a closely related concept is "vote trading"). Omnibus bills such as the U.S. Foreign Aid bill are one way to implement this political tactic that formally ties the mutual promises of its supporters together. This tactic is not specific to legislative negotiations and is also used in all sort of other kinds of negotiations, such as settlement negotiations in an effort to resolve lawsuits, and in business deals.
Indeed, another Politics.SE post notes that someone is basically voting for a omnibus hodgepodge of policies every time that person votes for a candidate whenever they don't perfectly agree with any of the candidates or political parties involved in an election for an elected office.
There is not a consensus on whether allowing logrolling is a good or a bad tactic to allow. The Wikipedia article in the first link above has a theoretical discussion of the practice considering the works of some of the leading political and economic theorists about the practice, which states:
In The Calculus of Consent, James M. Buchanan and Gordon Tullock
explore the relationship between individual choice in the voting
process and in the marketplace, specifically within logrolling.
Logrolling vote trades, like any activity within the marketplace, must
be mutually beneficial (Buchanan and Tullock 1962).
A vote trade is like a legislative IOU. When a legislator needs a few
more votes to acquire a simple majority, he will seek support through
a vote exchange. He will promise a fellow legislator an IOU vote for
another piece of legislation in return for a vote on his own act or
bill. Legislators who logroll within a small body, for example, the
U.S. House or Senate, have incentive to honor their IOU votes because
they cannot have their reputations tainted if they wish to be
effective politicians (Holcombe 2006).
People have varying preferences, and make decisions at the margin to
maximize their utility and improve their welfare. The same is true for
legislators, who all enter office with different agendas, passions,
and goals. Ideological diversity plays a significant role in the
result of a vote and carries with it a significant cost. In addition,
legislators will favor interests that offer them the most support.
Legislative votes are determined by the intensity of personal
preference, desires of constituents, and, ultimately, what will lead
to the particular legislator's greatest utility. When people have
ideologies at opposite ends of the political spectrum, it's difficult
to ensure a simple majority, so buying a supermajority vote through
logrolling may be the most cost effective (Buchanan and Tullock 1962).
In the General Possibility Theorem, Kenneth Arrow argues that if a
legislative consensus can be reached through a simple majority, then
minimum conditions must be satisfied, and these conditions must
provide a superior ranking to any subset of alternative votes (Arrow
1963). A bill must be attractive to a legislator, or else he will not
cast his vote for it. A vote, by the pure nature of the voting
process, demonstrates explicit interest in whatever is voted upon. In
logrolling, a superior ranking means that the marginal benefit of the
vote is greater than any alternatives, so exchanging votes is
worthwhile. The General Possibility Theorem necessitates that
allocating one vote for another must constitute true utility and a
sincere vote. Arrow's theory may place more restrictions and
limitations on an individual voter's preferences than Buchanan and
Tullock's; regardless, individuals will always choose the option they
value most.
Decisions reach an optimum only when they are unanimous, when votes
are not coerced and everyone has veto power (Buchanan and Tullock
1962). Unanimous votes, however, are not required for the American
voting process. This is why some logrolling advocates argue that
logrolling must be allowed within a democracy—sometimes there may not
be a "best" or "most efficient" option on a vote.
Logrolling creates a market within which votes are exchanged as a sort
of currency, and thus, facilitates the political process that produces
the highest valued outcomes (Holcombe 2006). If individual
participants recognize the value of their own vote, they are motivated
to trade. When methods of trade do not conflict with given standards
or ethical procedures, individuals naturally seek mutually
advantageous vote trades. An individual may effectually, but
imperfectly, "sell" his vote on a particular issue to, in return,
secure votes from other individuals on behalf of legislation he
prefers (Buchanan and Tullock 1962).
Logrolling has one necessary condition: benefits from the public
activity must be significantly more concentrated or localized than the
costs. In economics, decisions are made at the margin. Logrolling
depends on the reality that the marginal benefit (or utility) of at
least some elected officials, or the citizenry, will increase when the
legislation is passed (Buchanan and Tullock 1962). Any economist will
consider the immediate opportunity cost of the logrolling procedure
within the legislative body, as well as the external cost of the vote
(the cost to enact and see the bill through to fruition).
When transaction costs are low and parties involved are perfectly
informed, a mutually beneficial agreement will occur: whoever values
the property the highest will end up with it. This is what Ronald H.
Coase proposed in his Theory of Property Rights in 1960. This theory
holds true within the world of economics. In the American system of
government, legislators have the incentive to logroll because
transaction costs are low. When transaction costs are low, the Coase
theorem says that the political marketplace (the decisions of the
legislatures) will allocate resources to the highest valued point
(Coase 1960).
Typically, logrolling is a mechanism used to gain support for special
interest and minority groups. However, because of the ideological mix
that already exists within the legislature itself, minority views are
often represented, even if only marginally. With low transaction
costs, the Coase theorem will come into play. The highest valued
outcome is chosen by the legislature, regardless the member's
ideological stance or political affiliation (Holcombe 2006).
The problem of cyclical majorities may arise with the absence of
logrolling. The cyclical majority problem occurs when voters are faced
with multiple voting options but cannot choose the option they most
prefer, since it is not available. Voters must consider whether the
alternative option is closer to their original preference (Bara and
Weale 2006). However, when logrolling is allowed, the highest valued
outcome is secure without the threat of a cyclical majority. For
example, suppose a country road in West Virginia is in disrepair. The
local congressman proposes a bill to have the main road in his
community resurfaced and paved. The road leads to a town of merely 600
residents. Thus, the other legislators will vote against the measure
because the funding is not worthwhile to their constituents. In a
logrolling system, the local legislator can use his vote to bargain
with his fellow legislators. He will exchange his vote for his fellow
legislators' bills to promote, for instance, the construction of new
hospitals and the increase of veteran's benefits, in return for their
votes to repair the road (Buchanan and Tullock 1962).
The Founders Didn't Foresee It
The authors of Federalist Paper No. 10, one of the publications distributed to argue in favor of the adoption of the U.S. Constitution did not anticipate it. They thought, naively, that legislative proposals which did not have majority support would be defeated by majorities in the legislature, not foreseeing that supporters of various proposals that individually didn't have majority support would band together to get all of their proposals passed.
One of the flaws in the reasoning of Federalist Paper No. 10 is that it failed to recognize that legislators might intensely support some proposals, while having far less intense, mild opposition or indifference, to other proposals.
For example, a Senator might intensely support border controls and foreign aid for Israel, but not really have strong feelings one way or the other about foreign for Ukraine or foreign aid for Gazans. Another Senator might be indifferent about foreign aid for Israel and border controls, but strongly support foreign aid for Ukraine and foreign aid for Gazans. A bill that addresses intense policy preferences of both Senators, while supporting other policies that they don't care about, can get support from both Senators and get something done about those priorities, increasing the satisfaction of both Senators with the legislature's collective legislative accomplishments.
The Single Subject Rule Response
Some state governments attempt to limit this tactic with "single subject" requirements that require each bill passed to have a single subject. In thge U.S., 41 states apply the rule to all legislation, whereas Mississippi and Arkansas apply it only to appropriations bills.
But while single-subject requirements are often enforced rather rigorously with respect to citizen's initiatives, they are rarely enforced rigorously in the case of legislative action. In part, this is out of judicial branch respect for the legislative branch. In part, it is also because the proper remedy if a bill is passed with multiple subjects isn't obvious. Invalidating an entire bill passed by both houses of the legislature and signed by the Governor is a drastic remedy in a case where the question of whether a bill has a single subject or not is at least arguable. The definition of a single subject turns out to be quite hard to define in practice.
Single subject requirements can also be circumvented by legislators that engage in voting reciprocity, supporting the bills of other legislators who support their legislation, despite the fact that the separate bills are not passed as a package and the requirement of reciprocity is not binding. Legislators tend to be particularly socially adept and carrying out strategic behavior in this way, and a single subject requirement can't prevent them from doing so.
The Line-Item Veto Response
Another tool that exists in 43 out of 50 state governments and also in the District of Columbia, but not in the federal government (it was also present in the Constitution of the Confederate States of America during the U.S. Civil War), is the "line item veto" that allows a Governor to veto portions of an omnibus or multi-subject appropriations bill. This obviously doesn't work when the Governor approves of all components of the bill, but does prevent legislators from insulating appropriations that the Governor does not approve of politically from appropriations that "must pass" necessities for the state's finances, by putting them in the same bill.
Anti-Logrolling Rules Considered
Both of these reforms at the state level grew out of the general concerns articulated in the question, to a great extent, in response to how the legislative process works in Congress, where logrolling is permitted.
While both reforms are common in state constitutions, however, there really isn't any convincing evidence that political outcomes are significantly better in states or countries that have these reforms than in states and countries that do not.
For example, the line item veto is not present in Indiana, Maryland, Nevada, New Hampshire, North Carolina, Rhode Island and Vermont. But, there is really no convincing evidence that these states do a notably worse job at appropriating state spending than states that do have line-item vetos. See, e.g., this 1993 study.
Similarly, a leading academic study of the single subject rule (cited in 134 other academic papers) found that:
Despite generating thousands of cases on important public issues, the
single subject rule remains a source of uncertainty and inconsistency.
The root of the problem lies in the inability to define the term
“subject” using legal doctrine. This paper reexamines the single
subject rule through the lens of public choice theory and finds that
its purposes are wrongheaded. Logrolling is not necessarily harmful,
and improving political transparency requires legislative compromises
to be packaged together rather than spread across multiple acts.
Lack of clarity about the desirability of logrolling can also be found in state policies about vote trading. As another Politics.SE question and answer observes, in California it is a crime for legislators to trade votes with each other (although this is almost never enforced), while in North Dakota, the courts have found that vote trading between legislators is necessary to the healthy functioning of the legislative process in a democracy.
Multiple Small Horse Trades v. One Big Horse Trade
Another related issue is that in the U.S., with its strong Presidency, and weak party discipline, horse trading takes place very much in the public view throughout a legislative session.
In contrast, in Westminster style parliamentary systems in multi-party democracies, as opposed to two party systems, most of the biggest instances of horse trading take place behind closed doors at the outset of a legislative session, as part of the process of negotiating a multi-party coalition that can secure a legislative majority and elect a cabinet to run executive branch functions of the government. As a academic journal article on that process explains:
In parliamentary democracies a government is typically formed as a
result of a closed-door negotiation process among representatives of
political parties once the outcome of a parliamentary election becomes
known.
Once that coalition is in place, there is no need for ugly and public compromises in the middle of a legislative session on a bill by bill basis. Each party in the coalition identified its legislative priorities at the outset, and those priorities are then implemented at the leisure of the ministers in the coalition over the course of the legislative session, who can be comfortable that the firm bonds of the coalition will insure that the agreements entered to form the coalition in the first place will be carried out.
Compromises Are Necessary, But Are Rarely Popular
The average person doesn't trust people who compromise (and this is one of the reasons that monarchies and authoritarian leaders can be popular). People who negotiate and haggle deals, like car salesmen and lawyers and politicians, routinely come out at the bottom on surveys of public trust, while people who impose decisions on others, like U.S. Supreme Court justices and military leaders, are routinely viewed as most trustworthy in surveys of public trust. The negotiation process can come across as dishonest and isn't bound by unchanging principles in the same way, no matter what tactics are used to conduct negotiations. But negotiated compromise is very much necessary at all sorts of levels, for a society to function well.
Logrolling is one of several tactics to secure these compromises, but, if that isn't allowed, other tactics will be employed instead.
The bottom line is that securing majority support for a wide array of policies necessary to make a government and the country or region that it governs function well requires a certain amount of compromise and give and take to secure majorities to carry out necessary functions of government, even though this process is sometimes an ugly one. As American poet, John Godfrey Saxe, noted in a quote often misattributed to his contemporary, Prussian Chancellor Otto Von Bismark:
Laws, like sausages, cease to inspire respect in proportion as we know
how they are made.