In 2014, 500 of the highest-paid senior executives at U.S. companies made nearly 1,000 times as much money as the average American worker, after taking into account salary, bonuses, and stock-based compensation. That discrepancy is so enormous that it prompts a question: How exactly do companies come up with and calibrate the often-colossal pay packages they give to their leaders?

Through the 1970s—when the ratio of CEOs’ pay to that of the average worker was much lower, at somewhere between 20:1 and 30:1—the lodestar was “internal equity,” or how an executive’s pay compared with that of other employees in the company. A nascent industry, executive-compensation consulting, changed this. Consultants recommended switching to “external equity,” meaning compensation would be based on what other CEOs were paid. This was merely a useful sales tool—even though the consultants didn’t have solid evidence or theoretical justification for this method, they could attract business by vowing to set ambitious goals for their clients. Still, corporations adopted the standard of external equity, and CEOs got a lot richer.

External equity became the foundation of the series of pay practices and procedures that guarantee CEO pay will continue to skyrocket—something that I observed firsthand for over 20 years, as someone who helped companies, such as the ship-repairer Todd Shipyards (which has since been acquired) and the holding company Laird Norton Company, determine how and how much to pay their top leaders. Formally speaking, I was the member of various compensation, or “comp,” committees, which are usually made up of a few members of the company’s board and executives from other firms. (Every time I was on a company’s comp committee, I was serving as one of its board members.) The committee meets annually to recommend compensation packages for a handful of senior executives, including the CEO, and the company’s board virtually always accepts the committee’s recommendations.

The comp committee begins its annual work of achieving external equity by approving a peer group—companies that are supposedly comparable in size and complexity—recommended by management or compensation consultants. The peers need not be in the market for the CEO’s services. For example, a health insurer might include in its peer group banks, food producers, engineering firms, and a number of other unrelated companies. But what these companies pay should be irrelevant to what a health insurer should pay, because the their businesses are so different; a CEO's expertise in one industry is of limited value in another. For their part, companies today stand by this practice, arguing that unless they put forward a competitive compensation package, their CEO will go find a better offer.

What does tend to unite peer groups, though, is that the companies in them usually have highly paid CEOs. A study in the Journal of Financial Economics found that “compensation committees seem to be endorsing compensation peer groups that include companies with higher CEO compensation, everything else equal, possibly because such peer companies enable justification of the high level of their CEO pay.” Other studies confirm this finding.

Once a peer group is established, the next step is to figure out how the CEO’s compensation will compare with those of the leaders at the other companies. If the median pay of a CEO’s peer group is $10 million, should he get $10 million? (I use the male pronoun here because so many of them are men.) It depends on where the company is benchmarked within this group. And every board I have ever sat on or researched benchmarked itself at the 50th, 75th, or 90th percentile, therefore targeting CEO pay at similarly exalted levels. Benchmarking below the 50th percentile says, We are a lousy company and don’t even aspire to be better. So in this sense all CEOs are above average: To be benchmarked at or above the 50th percentile, they need not do anything other than report to a board that considers its own company exceptional.

Benchmarking is one of the main reasons that executives’ pay rises ever higher: Suppose a CEO gets benchmarked at the 75th percentile, which ends up earning him an annual pay package of $30 million. This $30 million works its way back into the peer groups of other CEOs making their pleas to comp committees, which then raises their pay. Their increased pay is then reflected in the first CEO’s own peer group down the line, once more raising his pay. In other words, every time a CEO gets a generously-benchmarked deal, he sets a higher baseline for the next time any leader has pay negotiations.

And that is just the base compensation. The better the CEO’s company performs, the more he should be paid, right? “Pay for performance” is corporate dogma, which means that it is not unusual for a CEO who has a base salary of $15 million a year to earn $30 million or even $45 million if he surpasses his bonus targets.

There are a number of things that make pay for performance a murky concept, and this murkiness can push CEO pay even further upward—bonuses make up a larger portion of compensation than many realize. A comp committee’s task when it comes to bonuses is to agree on a way to measure performance and then map those onto dollar amounts. This process usually involves negotiating with the CEO, much to his advantage: The board wants to keep the CEO happy since he is the captain of the team and since he holds the implicit threat of moving to another company for better pay. Enhancing these negotiations from the CEO’s standpoint, he pockets what he gets, while the directors are paying not with their own money but shareholders’.

These negotiations are particularly troubling when a CEO is not newly appointed, but instead has been in charge of the company for years. It’s impractical, if not impossible, for board members, committed to being supportive, to transform themselves into hard-nosed negotiators, especially when the CEO controls the company’s resources (as well as the information that might be used for bonus targets) while the comp committee has neither staff nor institutional memory. Also, oftentimes, the CEO is friends with members of the board.

Additionally, most directors know they won’t be personally liable no matter how much they pay the CEO; something called the business-judgment rule—which is derived from case law and accepts that business is inherently uncertain and risky, allowing directors to exercise their best judgment without being liable for unprofitable choices—protects them in executive-compensation decisions. Also, there is safety in numbers. Directors can reassure themselves that they are acting precisely as all other Fortune 500 board members act, and even rationalize that the profligacy of those other boards created this problem: Those boards acted irresponsibly, established ridiculous pay levels, and left us with no choice but to match them.

And all this is to say nothing of the power CEOs hold over the agreed-upon metrics that will dictate bonuses. For example, some companies base bonuses on earnings per share (EPS), which is profit divided by the shares of stock outstanding. But EPS is not always a good measure of performance: Rising EPS may be due to nothing more than a good economy, increased industry demand, or even, in certain industries, a mild winter. And, worse, EPS is easily manipulated. Using a few accounting tricks, CEOs can make EPS do their bidding. The stock may be down, the competition dominating the market, but the CEO still gets his bonus if he hits the EPS target.

Though a common practice, tying bonuses to budgets or other management forecasts is a bad idea; the CEO possesses a lot of information about next year’s earnings, about which the board knows comparatively very little. Tying a bonus to a budget encourages a CEO to “sandbag,” or submit an easy budget. It pays the CEO for dishonesty and penalizes him for honesty. It also, beyond the CEO’s own situation, corrupts the financial information that is critical for controlling and monitoring any organization.

The CEO is in an even better position when negotiating bonus targets that aren’t tied to financial metrics. I have sat in comp committees that considered bonusing the submission of a plan that promised to do nothing more than increase profits or hire “dynamic” subordinates.

A range of performance-based bonuses makes sense at first glance: If a CEO accomplishes more, he gets paid more. But given his negotiating edge, the CEO’s bonus target in effect becomes a floor. Though I could find no good data on how often CEOs beat their negotiated targets, I estimate that I have seen them do it roughly 80 percent of the time. With bonus targets and ranges, a CEO whose compensation target was $15 million can make double or triple that amount regardless of his abilities, so long as he is a good negotiator, a deft financial manipulator, or just lucky.

And even if he misses his bonus targets, a CEO can usually rely on the sympathy of the board. Directors make adjustments to account for rain but seldom for sunshine. When a company is underperforming, directors are quick to make upward adjustments that increase earnings per share. When business is good, directors are reluctant to make downward adjustments: Why penalize the CEO when the company had a good year?

Indeed, about a dozen of the 30 companies that comprise the Dow Jones Industrial index adjusted their earnings upward when calculating their CEO’s bonus in 2015. Consider what Nationwide Mutual Insurance did in 2011. That year, the company decided that claims from an unexpected succession of tornadoes shouldn’t count against its CEO’s performance measures, which doubled his bonus. (And here I thought weighing the risks of unusual occurrences was what insurance was all about.)

When asked about this revision, Nationwide called this scenario “rare” and noted that its “pay-for-performance philosophy” applied throughout the company, not just to top leadership. The company said in a statement, “The Nationwide Board retroactively approved performance incentive payments for all associates in 2011 to recognize a focus on excellent customer service during a period when our customers needed us most.” That said, the doubling of the bonus of the CEO—who reportedly that year made $5.3 million in total pay—was probably more consequential than the increased bonus any given Nationwide employee saw. (Nationwide declined to disclose any specifics about the pay or bonuses of its employees beyond what it includes in filings to regulatory agencies.)

Bonus targets are supposed to be proxies for how a company is doing in the short term. But it’s a constant struggle in business to balance the long term against the short term. So, rather than leave this to the wisdom and judgment of the CEO and board, corporations also give out “equity awards,” or stock-based pay, to make sure executives’ eyes are on how the company will be doing in several years. The thinking here is that a CEO who’s receiving stock is incentivized to do what he can to not to let that stock drop in value.

Equity awards, which typically make up over half of a CEO’s realized compensation, usually come in two forms. The first is a stock option, which means the executive can buy a fixed number of shares in the future at today’s market price, even if the stock has appreciated since the options were issued. The second is restricted stock, which means the executive is assigned shares, but doesn’t own them until certain conditions are met.

Paying CEOs in stock further props up their pay: When the economy is thriving, stock prices can rise across the board, and thus most CEOs’ pay rises too. But even if the market cools off, expectations for what CEOs should be paid—as reinforced by benchmarking and other mechanisms described above—tend not to come down when that happens. Moreover, in order to make more money from selling the stock they were given, CEOs can induce a higher share price by having the company buy back its own shares; a share buyback, though, can come at the expense of initiatives that might serve the company better in the long run, including funding research and development or employee training.

The majority of companies I researched did not require the CEO to accomplish anything to receive equity bonuses. Instead, they were awarded with the curt explanation that the compensation was in line with the CEO’s peer group. When a performance test was required, it was often based on a negotiated criterion and allowed the CEO to receive far more than the initial target. In yet another way, executive pay is shaped by what is ostensibly pay for performance, but is more often than not a routine jump over a very low hurdle.

* * *

There are lots of people who make enormous amounts of money. Athletes do. So do movie stars. So why pick on CEOs?

Perhaps it’s because athletes’ and movie stars’ compensation determined more directly by supply and demand. NBA teams bid for LeBron James because his skills are portable. He would be a superstar anywhere he played. But CEOs, whose pay is not set by a comparably competitive auction market, are different: No matter what their peer group might indicate, their skills are seldom portable. A successful CEO must fully understand a single company—its finances, products, personnel, culture, competitors, and so on. Such knowledge and skills are best gained working within the company and not worth much beyond it and its closest competitors. Therefore, companies seldom raid others for CEOs: Most CEOs at big companies were appointed through an internal promotion, and CEOs rarely jump between big companies. (That’s because when they do, they usually don’t find much success.)

Another, more symbolic reason that people get upset about CEOs’ salaries, and not celebrities’, is that the value of celebrities is more obvious. LeBron James is extremely talented, and fans are paying good money to watch him play night after night. Tom Cruise is the face of the Mission: Impossible franchise. If a movie in that series makes hundreds of millions of dollars in ticket sales, it wouldn’t seem unfair for him to make 5 percent, even 10 percent, of that. If James Patterson sells millions of books, it’d be weird for him not to have millions of dollars.

A CEO’s value-added is less obvious. He’s providing guidance and oversight, sure, but his typical employee is the one actually producing a good or service. So when a CEO is earning hundreds or thousands of times as much as that typical employee, it seems unfair in a way that’s more visceral and even, in a way, logical. And another important difference is that few are harmed when LeBron James or Tom Cruise make a ton of money—it’s unlikely that a team or a studio is going to lower its ticket prices if either were paid any less. Meanwhile, there is a case to be made that outsize CEO pay harms employees, the economy, and even companies themselves.

So what can make boards and CEOs act differently? The responses to high executive compensation so far—public outrage, say-on-pay votes, SEC-mandated disclosures, congressional hearings, newspaper editorials—have limited value. From what I have seen, only a blunt instrument will alter behavior. My preferred blunt instrument is a luxury tax. For every dollar a company pays any executive over, say, $6 million, it would pay a dollar in luxury tax. This very simple solution would fix the problem immediately. Is it politically possible? It doesn’t seem like it’ll happen anytime soon, but a candidate running on a platform that includes paying CEOs less would probably do quite well.