My last visit to Dongguan, China’s widely acknowledged and often acclaimed prostitution capital, was in 2011 (for a factory visit), and included a breakfast meeting at a well-known U.S. chain hotel, in view of the elevators that whisk customers to their rooms. It was a memorable meal: Over eggs, my companions and I watched as those elevators discharged a flood of young women, one after the other, yawning and rubbing their eyes, clad in last night’s high-cut dresses. Not one stopped for breakfast, nor to settle room charges at the front desk. They simply sashayed out the revolving doors and into Dongguan’s smog.

More than likely these young ladies were representative of the 500,000 to 800,000 prostitutes which Chinese media estimate who worked in Dongguan up until 9 p.m. on Feb. 9, when authorities launched an unexpected crackdown on the city’s thriving but still illegal (prostitution has been illegal in China since 1949) sex trade.

The numbers, as reported by Chinese media, speak to the scale: In 2011, revenue from sex-related businesses in the city totaled around $8 billion, or roughly 14 percent of Dongguan’s export manufacturing-based economy.

The industry included some “807 massage and bath houses, 1,228 hotels, 636 hair salons and 465 KTV parlors.” Shutting down a trade of this size requires manpower: Dongguan deployed “more than 6,000 police” to do the job, sending prostitutes and johns fleeing to safer havens. That’s not the end of it: on Sunday, China’s Public Security Bureau called upon police across China to follow the example set in Dongguan and to “firmly crack down” on prostitution, as well as gambling and drugs.

It’s become commonplace to refer to Dongguan’s sex trade as an “open secret.” In truth the only thing unknown about the sector was who, precisely, was to blame for helping prostitution to become such an important component of the economy. Authorities quickly fingered Yan Xiaokang, the vice mayor and also police chief of Dongguan, who was fired over the weekend for “dereliction of duty.” He probably was derelict, but ― based on the sheer scale of the industry ― could hardly have been acting alone.

China is a country that still issues, and to an extent follows five-year economic planning documents. While brothels have yet to appear in any of them, that doesn’t mean some officials don’t view them as a source of employment and tax revenue on par with, say, shoe factories. In fact, there’s a tradition of this kind of thinking in China that dates back at least to the late 1990s.

In 1998, according to a contemporary Baltimore Sun report, “at least” 14 Chinese cities were taxing prostitution ― despite the fact that the sex trade remained illegal. More brazenly, in 1999 Mu Suixin, then mayor of Shenyang, a rusting industrial town in China’s northeast, openly encouraged the development of prostitution as a means to stave off chronic unemployment ― and then levied a 30 percent tax on the trade. Unfortunately for him, Mu’s pragmatism didn’t win him any fans in Beijing: In 2001 he was convicted of corruption (not related to prostitution) and given a suspended death sentence.

Cases like Mu’s, and a more recent one in which several high-ranking Shanghai judicial officials were filmed cavorting with prostitutes, surely must have piqued Xi Jinping’s interest. If prostitution ― and the means by which it’s protected ― can be rooted out, then so perhaps can the endemic corruption which Xi has staked so much of his credibility on eradicating.

Despite what may be the best of intentions, though, Xi is almost certainly not going to succeed in ending prostitution in Dongguan, much less China. The practice is too deeply engrained in the economy, as well as the culture of doing business, to disappear. Most likely, the crackdown will only serve to drive the sex trade a bit further underground until more pressing issues supersede the government’s attention.

The obvious alternative is legalization and legitimization. It wouldn’t be easy. Mao Zedong successfully weeded out the sex trade in mid-century China, and the Communist Party is highly reluctant to turn its back on his legacy, regardless of the sector. But surely a failed effort to root out the trade would be far more embarrassing than a concerted effort to regulate and tax prostitution legally.

At a minimum, legalization would bring some badly needed transparency to an industry that forced underground, would rely more and more on the kind of bribes and payoffs to local officials that Xi is trying so hard to end.

By Adam Minter

Adam Minter, the Shanghai correspondent for the World View blog, is the author of “Junkyard Planet,” a book on the global recycling industry. ― Ed.