The next time you’re fortunate enough to have dinner at a high-end restaurant, take a moment to enjoy not only the food and wine, but the frisson of a really good puzzle: Why do restaurants price things the way they do?

The markup on food makes sense. It takes time and skill to prepare the perfect cold-smoked salmon with balsamic-vinegar sorbet. But why are the wine prices so inflated? How hard can it be to pop open a bottle? Meanwhile, restroom access is free and unlimited for customers—a curious cross-subsidy.

Most mysterious of all: When reservations at hot new restaurants are so sought-after, why are they simply given away?

It turns out that economics nerds like me aren’t the only ones asking these questions. Silicon Valley start-ups have not yet figured out a way to monetize the restaurant restroom—give them time—but in the past year or so, quite a few have zoomed in on the hitherto underexploited market for reservations.

Their strategies have varied. Table8, for example, has partnered with restaurants in Miami, Washington, D.C., Los Angeles, Chicago, and San Francisco that set aside tables specifically for Table8 to sell through its app. The company charges up to $25 for a table, and it splits the fee down the middle with the restaurant. Resy, an app that currently partners with restaurants in four major cities, is similar.

ReservationHop and the Orwellian-sounding Food for All, on the other hand, both started out selling reservations without restaurants’ knowledge. Under a hail of complaints (“Everyone seems mad at ReservationHop,” TechCrunch noted last year), the latter stopped operating altogether while the former, following its “soft pivot” to increased coordination with restaurants, made a “hard pivot”—expect to see celebrity couples adopting this phrase to describe their divorces—and abandoned the reservation business entirely.

Killer Rezzy, which operates in New York, is a sort of hybrid. The company is keen to mention its revenue-sharing partnerships with “the best and most sought-after restaurants.” Nonetheless, the site also sells reservations for restaurants without sharing revenue, and sometimes without their cooperation at all. The company’s founder, Sasha Tcherevkoff, is unapologetic: his aim is to keep his customers happy, he says, whether the restaurants approve or not.

And then there’s Shout, an online marketplace like eBay that in principle could be used to traffic pretty much anything, but that in practice appears mostly to involve people selling New York City restaurant reservations to one another.

Outrage about all this has been liberally expressed in Twitter storms and on food blogs, by customers who don’t want to pay for something they feel should be free, and by restaurateurs who object to having their reservations sold without permission or who simply believe the idea lacks class.

But why, exactly, do these reservation traders make us uncomfortable? And what does their existence tell us about what’s being gained and lost in our ongoing march toward a commoditized, peak-priced economy?

These new companies are actually violating two subtly separate traditions. One is the idea that a meal is a meal, and the price should be the same whether it is served at 5 p.m. on a Monday or 8 p.m. on a Friday. The second is that a reservation is part of a meal, not a separate commodity with its own price. The reservation sellers have crossed both lines, treading on the pristine sanctity of restaurant customs.

Let’s first consider the idea that reservations should not be bought and sold. It’s true that certain things change when they involve a financial transaction. It would be odd to pay your mother-in-law for Thanksgiving dinner. The most casual of one-night stands is regarded as qualitatively different from paying for sex with a professional. The gift of a kidney seems noble; the sale of a kidney, not so much.

Perhaps all of this is what Tina Vaughn, a Manhattan restaurateur, had in mind when she criticized reservation sales in a New York Times article last year that was headlined “Hospitality Has No Price.” But I’m sure that if I were to dine at Vaughn’s restaurant, the Simone, she would be unimpressed if I left without paying on the basis that “the pan-roasted black sea bass has no price.” The meal is a market commodity, so why claim that the reservation is something altogether different?

What’s more, while restaurants have traditionally treated the reservation as an integral part of the meal, their customers can already unbundle the two if they wish by simply not showing up. No-shows are a nightmare for restaurant owners—reportedly affecting 10 to 20 percent of tables—but it is hardly a shock that when restaurants give away scarce reservations, some customers treat them as valueless.

What about the separate question of whether you should pay more on a Friday night than early in the evening midweek? In the economics textbooks, it’s a simple case of supply and demand. And, of course, restaurants already dabble with peak pricing, although most of them would never describe it as such. A 30 percent discount for off-peak diners just sounds tacky. Try a “pretheater menu” instead—so civilized! And no restaurant would be so crass as to add a surcharge to the usual menu simply because it’s Valentine’s Day. Instead, “special menus” are devised for the holiday, giving a decorous excuse for charging extra.

There are limits to how far a restaurant can take such strategies. And thank goodness, most of us would say, because peak pricing privileges the rich. But such arguments are more persuasive when we are talking about access to basic health care or voting. When we’re debating who gets a table at the Slanted Door in San Francisco, then the case has a little less bite.

More to the point—and this will surprise some people—charging extra for tables at busy times should ultimately benefit almost everyone.

This is because the status quo is wasteful. A restaurant that could earn revenue from charging you for a reservation earns nothing from making you wait in line, but you bear a cost either way. And although “first come, first served” may seem fair, the idea takes no account of customers’ willingness to pay. I may be desperate to try a new restaurant, while you chose it at random, but if you called the restaurant first, you have the reservation. Everybody could be better off, but only if we’re willing to violate the taboos against buying and selling reservations and against the peak pricing of meals.

How might reservation apps and peak pricing make us better off, especially those of us on a budget? Restaurateurs will make more money in the short run. In the long run, this means more restaurants, more tables, and keener competition for customers. That, in turn, means that even if prices rise at peak times, prices at other times should fall. Richer customers will get convenience, while thriftier customers will pay less than they did before.

The coldly rational vision offered by the reservation apps, in other words, makes some social sense. It’s a vision of a world in which anyone can pay extra to get a table for a special occasion, yet everyone has more choices and more opportunities to save money by choosing an off-peak sitting. Why, then, does the whole idea fill many restaurateurs—and many patrons, too—with horror?

The answer is a four-letter word: Uber. Just as the reservation-selling apps promise dining convenience for a price, Uber promises to get you a car whenever you want it—after the football game, on New Year’s Eve, during a deadly armed siege in downtown Sydney—provided you are willing to pay.

The problem is that the company’s “surge pricing” can mean you’ll pay hundreds of dollars for a short journey at the busiest times. Uber quickly backed away from surge pricing during the December 2014 siege in Sydney, but in general it has been unrepentant about the policy despite ceaseless wails of protest from customers and journalists. Unlike your neighborhood restaurant, Uber believes in prices that sharply adjust to supply and demand, and it is willing to endure the grousing that this position entails.

Back in 1986, a team of psychologists and economists researched the question of how market logic can be limited by our perceptions of fairness. Jack Knetsch, Richard Thaler (a co-author of Nudge), and Daniel Kahneman (a psychologist who subsequently won the Nobel Memorial Prize in Economic Sciences) asked people how they felt about scenarios such as this: “A hardware store has been selling snow shovels for $15. The morning after a large snowstorm, the store raises the price to $20.”

They found that although the market logic is clear enough, most people find this practice unfair. We do not like being exploited, and knowledge of the laws of supply and demand does not change that visceral response. Uber decided to employ surge pricing despite the risk of alienating customers. As an insurgent with no preexisting customer relationship, it could take the view that any publicity is good publicity. Few other companies are willing to tread that path so brazenly.

Even Steve Jobs had to apologize for peak pricing. The original iPhone debuted with a $599 price tag, but after the first rush of orders died down, Apple cut the price to $399. That made economic sense: Initial demand was high, so why not charge a premium to those folks who wanted to be early adopters? Customers, however, did not see things that way.

This is why most businesses are cautious about surge pricing, although some—including Uber and the airlines—have bitten the bullet. But concert promoters, sports teams, and restaurants have generally preferred to make their customers wait, or go without, than enrage them by asking the market price.

So will reservation apps survive? Probably. Market logic demands that scarce commodities be traded in such a way that they reach the people most willing to pay, even though our gut tells us that this is no way for our favorite restaurant (or band, or sports team) to behave.

The obvious way to resolve the tension is by outsourcing the blame, which may explain why tech start-ups have taken the step of selling reservations while restaurants themselves maintain a dignified distance. Sasha Tcherevkoff of Killer Rezzy says that some restaurants refuse their share of the revenue that would come with a partnership, yet cooperate willingly with his efforts to prebook reservations for resale. They’re happy to fill their tables with high-rolling customers who reliably show up, but they don’t want to be associated with the sale of their reservations.

Annoying as it may be, the reservation market will help the restaurant industry work better. Just don’t expect many restaurateurs to say so publicly.