My wife is angry at the government. No surprise there, I suppose — we do have a great deal in common.

To be more specific, my wife is angry with the city of Charleston, South Carolina. For the better part of a year, she’d be planning a vacation to the historic city with her mother and sister. They’d lined up a beautiful and reasonably affordable place to stay — a private home offered online for rent.

But earlier this year, Charleston adopted new rules governing short-term rentals. They are strict. The property owner has to file site plans, get costly inspections, live in the house full-time, and in fact can’t vacate it during the rental period.

Those offering Charleston homes for rent had hoped to get the rules loosened, or that the city wouldn’t really enforce them. Their hopes have since been dashed. My wife’s rental agreement, arranged months ago, went “poof.”

While some neighbors may complain here and there about parked cars or unfamiliar boarders, the true driving force behind municipal restrictions on short-term rentals, “granny flats,” and other commercial uses of private homes is that existing providers — think hotels, bed-and-breakfast owners, apartment managers — resent the competition. It shouldn’t shock you to learn that once Charleston restricted short-term rentals, prices for hotel rooms shot up.

Protection of politically favored business is a familiar story. Every kind of government is implicated. In Washington, the protectionist lobby is currently experiencing a bit of a resurgence, thanks to a populist alliance of the labor-union Left and the Trump administration. At the state level, industries and professions routinely lobby for occupational licensing, which has the effect both of excluding competitors from the market and of creating demand for training services that just happen to be provided by very businesses lobbying for licensure.

North Carolina is, unfortunately, worse than the average state when it comes to occupational licensing. We have dozens of regulatory boards plus relatively onerous training periods and licensure fees. We license twice as many occupations as Virginia does and three times as many as South Carolina. Of course, our consumers aren’t two or three times safer. For most occupations, the only discernible effect of licensure is to raise prices.

Across local governments, the protectionist impulse isn’t confined to housing. The taxi industry resents and tries to squelch Uber and Lyft. Restaurants resent and try to quash food trucks.

As infuriating as protectionism is, there are reasons for optimism. When it comes to services such as Uber and Airbnb, for example, I think incumbent industries and their political protectors will ultimately fail. The logic of the situation will prove inescapable. For decades, owners of homes and cars had valuable capital sitting vacant and unused. There were no practical means of discovering potential customers, coordinating schedules, or facilitating simple payment. Then the Internet showed up. I don’t think the public will accept the idea of turning back this clock.

Victims of protectionism also have legal remedies. In the coastal community of Carolina Beach, the government had prohibited food trucks unless they were owned and operated by brick-and-mortar restaurants. On August 21, the Institute for Justice announced a lawsuit on behalf of food-truck owners. It challenged the ordinance as a violation of North Carolina’s constitution, including its anti-monopoly provision. A week later, Carolina Beach retracted its ordinance.

Incumbent businesses do have some legitimate grievances. Compelling hotels to jump through various governmental hoops and collect high occupancy taxes does hamper their ability to compete with short-term rentals. The answer, it seems to me, is to reduce significantly those regulatory and tax burdens before attempting to broaden their application.

Suppressing competition only works for a time. Protectionism is a losing proposition in the long run. Adam Smith made this observation about international trade centuries ago, and he’s still right. As for my wife, she remains angry at Charleston. But she’s still excited about her coming trip with her mother and sister to an historic Southern city.

They’re going to Beaufort, instead.

John Hood (@JohnHoodNC) is chairman of the John Locke Foundation and appears on “NC SPIN,” broadcast statewide Fridays at 7:30 p.m. and Sundays at 12:30 p.m. on UNC-TV.