Yet there is another way to view the situation. It was only because the price was so high that I was able to buy tickets at all on such short notice. If legal restrictions or moral sanctions had forced prices to remain close to face value, it is likely that no tickets would have been available by the time my family got around to planning its trip to the city.

High prices are a natural reflection of great demand and scant supply. In a free market, in which private individuals can engage in mutually advantageous gains from trade, they are inevitable until demand subsides or supply expands.

The comedian Jay Leno learned this lesson some years ago. In 2009, while the economy was suffering through the Great Recession, Mr. Leno, a car enthusiast, generously performed two free “Comedy Stimulus” shows for unemployed workers near Detroit.

Yet zero is not, as economists put it, the equilibrium price to see a live performance by Jay Leno. Some of the unemployed who received free tickets tried to turn around and sell them on eBay for about $800. When Mr. Leno learned about this, he objected, and eBay agreed to take down offers to resell the tickets.

But why should Mr. Leno have objected? Some unemployed workers, presumably short on cash, thought that the $800 in their pockets was more valuable than an evening of laughs. Similarly, the ticket buyers would voluntarily give up their $800 for a seat. The transaction makes both buyer and seller better off. That is how free markets are supposed to work.

The only person made worse off by the sale is, perhaps, Mr. Leno himself. He wanted to be seen performing before an audience of the unemployed. Doing a show for higher-income residents of Michigan might not be viewed as altruistic, even if it left the unemployed better off. In other words, Mr. Leno’s objection to the eBay resale was arguably a rationally self-interested act in that the resale impeded his ability to appear selfless to others and, even, to himself.

Although I don’t object to ticket resales above face value, and I think it is pernicious when others do, I was saddened by my “Hamilton” transaction in one important way. About 80 percent of what I paid went to the ticket reseller, rather than to Mr. Miranda and his investors.