It might seem ironic that Virginia, which threatens merchants with punishment if they charge "unconscionable" prices during an emergency, recently hit motorists with tolls as high as $40 for a one-way trip on I-66. But the subsequent freakout over the tolls was misplaced. They did just what they were supposed to do. And that holds a lesson for the state's lawmakers.

If you missed the backstory, it's fairly simple: Recently the state's Department of Transportation adopted a new system of congestion pricing for I-66 inside the Beltway in Northern Virginia. During rush hour, all of the lanes in the primary direction of travel are tolled. What's more, the tolls are dynamic and real-time: They go up as traffic congestion increases and down when it recedes. In other words, as demand for the road rises, so does the price to use it. Econ 101.

When the tolls initially debuted, they quickly shot up to $40—a high price to pay to travel just 10 miles. A parade of outrage ensued. And state legislators who represent Northern Virginia bravely jumped in front of it, sending a letter to Transportation Secretary Aubrey Layne demanding that he "immediately suspend toll operations."

If that were all to the story, they would have a good case. But it isn't.

First, the tolls apply only to solo drivers, not car-poolers. That's because the tolls aim to reduce congestion, not to raise revenue. The goal is to keep traffic flowing rapidly and—as Layne put it in his response to lawmakers—to move "more people not just more vehicles."

Second, drivers who don't like paying the rush-hour tolls on I-66 don't have to. They can choose another route. In fact, before the implementation of the express lane system, solo drivers were required to: They were not allowed to use I-66 during rush hour at all (except for drivers of hybrids). So motorists are complaining about getting a new option because they have to pay for it. The horror.

Granted, other routes have their own downsides, such as stoplights. One motorist interviewed by The Washington Post told the paper "that she could take Route 50 but finds the traffic lights discouraging." Well, sure. But also: Welcome to a world of finite resources.

In a finite world, everything must be rationed. And the two principal ways to ration things are (a) prices or (b) lines. If you don't like standing for hours in line at Disney World, you can pay extra to use a shorter line. Don't want to pay extra? Wait longer.

But commuters in Northern Virginia such as the one the Post interviewed have the luxury of a Door No. 3: "She plans to give Metro, and a $16 round trip including parking, a try," the newspaper reported.

As word of the sky-high tolls spread, many other drivers also found alternate routes. Mirabile dictu, the average rate of travel on I-66 increased from 37 mph to 54 mph, and the tolls fell. Soon the peak toll had fallen to $14.50. Note the adjective: That's the peak toll, not the average.

The $40 toll that sparked so much outrage also was a peak toll. How many people actually paid it? A grand total of 39.

The state's approach here makes perfect sense. Prices are signals, and rising prices tell (solo) motorists: "You are hogging too much of a scarce resource. Get off the road so more people can use it." When the solo drivers comply, there's more road left for other users and traffic flows more smoothly.

Virginia clearly understands this dynamic when it comes to lane miles. So why doesn't it apply similar logic in other situations?

Whenever a hurricane, snowstorm, or similar event strikes, officials send out warnings to let merchants know the state's Post-Disaster Anti-Price Gouging Act is in effect, and they must not charge prices the state deems too high. In some cases it has forced merchants to issue refunds.

But high prices work just the same in stores as they do on the roads. They send a signal to people who are buying gasoline, bread, milk, and batteries that they should not try to hoard such staples. Not only that, high prices do an extremely efficient job of preventing hoarding. That leaves more of the scarce resources for others.

Sometimes, of course, people will have a strong reason for wanting a particular resource. If you have an important job interview and don't want to be late, it's well worth paying $20 to drive solo on I-66—or paying $10 for a gallon of gasoline to get you there. But most of us don't have such exigent circumstances most of the time. So high prices encourage us to leave more of the resource for those who truly need it.

Now that the Commonwealth of Virginia is applying that principle on the roads, perhaps it should let the state's merchants apply it as well.

This column originally appeared in the Richmond Times-Dispatch.