Selling political favors works: That’s clearly Mayor Bill de Blasio’s philosophy, and his bid to box in hotels to please their union is but the latest example.

On Monday, Crain’s reported that Hizzoner ordered city planners to “study” the idea of forcing hotels to get special permits, a move long sought by the hotel union.

Just coincidentally, the union is the only labor group backing de Blasio’s 2020 bid. This month, The Post reported that 70% of his donors are tied to it.

Requiring special permits means tying up hotels in Gotham’s land-use review and making them beholden to the City Council, many of whose members are themselves in thrall to the Hotel Trades Council.

Upshot: Hotels would have to agree to union terms. Nice deal for the union.

Yet there’s no good reason for the permits: As a union memo notes, according to Politico, even the city doubts “there is a land-use rationale” for hotel permits.

And the excuses de Blasio and union boss Peter Ward give are beyond lame: The mayor says he wants to give communities a say, but few have asked for one. Ward cites hotel “overdevelopment,” but that’s an issue for the market, not government.

The Real Estate Board’s Basha Gerhards wonders: “What’s the problem they’re trying to solve here?” Good question.

This isn’t the first favor de Blasio has done this union: He also cracked down on Airbnb after HTC (that time, in cooperation with hotel operators) griped about the competition.

Pay-to-play remains this mayor’s standard operating procedure. When the sanitation workers union recently solicited donations to his 2020 campaign, a member bragged, “Watch us get a sweet raise now before he’s out the door.”

It’s obscene. De Blasio narrowly escaped charges for his shenanigans before, but, as Common Cause head Susan Lerner puts it, “he keeps taking the wrong lessons” — thinking “he can get away with these things.” Sadly, he may be right.