I love Airbnb. My extended family went to Paris and stayed in one big house for more than a week — a vacation that would have been unimaginably expensive before the days of the sharing economy.

I often see tourists in Bedford-Stuyvesant, a beautiful Brooklyn neighborhood mostly unnoticed by travelers in the past.

That’s changing with Airbnb. Still, sometimes even a good service needs to be regulated.

Costly housing is one of the biggest headaches facing NYC’s non-millionaires.

I know many talented, hardworking people who are leaving the city because they just can’t afford the rent — or many others who simply can’t afford to move and live here despite the cultural, professional and business opportunities. By taking so many rental units off the market, many Airbnb users have been contributing to the problem.

New York has been attempting to deal with the impact and the popularity of Airbnb. In 2010, the state made it illegal to sublet an apartment for fewer than 30 days if the owner or leaseholder is not present. This law is widely violated, but Gov. Andrew Cuomo recently signed a law that imposes stiff fines — up to $7,500 — for posting a rental for any term short of the 30 days established in the 2010 law. (Airbnb responded with a lawsuit, claiming the fines will wreak “irreparable harm” on the company.)

Cuomo is right. But neither state law nor Mayor Bill de Blasio’s support for it will be seen as a principled defense of ordinary New Yorkers. Nor will Attorney General Eric Schneiderman’s investigation of Airbnb.

Even though these moves are justified, they will be seen as favoring the hotel industry, which has contributed heavily to political campaigns. One hotel CEO was quoted in The Washington Post gloating about raising prices in NYC in light of the new policy.

In de Blasio’s case, it’s a pattern. Even when he does the right thing — seeking to regulate Uber or protect the horses in Central Park — he does so at the behest of donors, and the principle involved gets lost.

Here’s a bold idea: Our politicians should stand up for ordinary New Yorkers every day. That way, when they make arguments on our behalf, we don’t respond so cynically.

Liza Featherstone lives and writes in Clinton Hill.