TAIPEI (TheStreet) -- I had a "what the?" moment while reading a Gates Foundation statement that it would offer $5 million for reinventing the toilet in China.

Could the foundation's first single-country toilet design project help Microsoft ( MSFT - Get Report) try for a royal flush with Chinese authorities as it pushes into the market of 600 million PC users against strong preferences for local software providers? Is it because some of us would like to flush Windows 8 down the pipes?

Neither metaphor makes the point. The point is about China itself.

Expect a blast of air freshener if the country can meet its toilet challenge as well as a much smellier one for which toilets are merely a fitting symbol. The offer to pay R&D for what the foundation calls a "next-generation toilet" comes as China grapples with mounting waste of all manner from its fast-growing urban population.

Modernizing the toilet would symbolize an assault on the huge cleanup (or disaster) ahead for China due to record flows of rural migrants headed for its already smoggy, congested un-zoned first-and-third-world mash-ups known as cities.

Urbanization in China, speedier than in Europe or Latin America at just six decades, presents obvious pollution and sanitation problems. In 2011 more people lived in Chinese cities than in rural areas for the first time, the United Nations Development Programme says. A UNDP report says that 60 years ago just 10% lived in urban areas.

The Gates Foundation, which has already funded 16 toilet research institutions around the world, seems to understand: "The Reinvent the Toilet Challenge is designed to spur innovation and bring creative thinking to solve the problem of dealing (with) human waste," its Aug. 22 statement says.

Another 310 million people will leave the countryside by 2030, putting 1 billion or 70% of China's population in cities, the UN agency adds. Chinese people prefer cities for their better-paid jobs as farming is financially unreliable due to drought, floods and substandard rural health care.

Beijing officials aren't holding the migrants back, although newcomers to Chinese cities may still face legal inconveniences until they have steady enough work to register as urbanites." So they are plotting ways to head off urban glut. With "efficient use of natural and energy resources" a top UNDP concern, the UN agency and Chinese Premier Li Keqiang are angling toward a scheme that both call an "eco-civilization" plan for the burgeoning cities.

"The vision and principle of eco-civilization should be fully integrated into the whole process of urbanization, and we should take a new urbanization path which is intensive, smart, green and low-carbon," the UNDP quotes Chinese Academy of Social Sciences President Wang Weiguang saying at an event to announce its report.

I'm not sure quite where this statement leads, but smart and green should be keywords. Establishing a post-2013 toilet for a nation where poorer people still depend largely on outhouses and busted flushing devices wouldn't be dumb. If the porcelain god can save water in a largely arid nation, then it would fit the 2013 definition of green.

WCs make sense as a starting point because Chinese officials have worked on modernizing them since 2005 when Shanghai hosted the World Toilet Expo. Moving to ease stench and sometimes embarrassingly obvious sanitation problems as high-end foreign visitors throng inward along with migrants, city governments such as Shanghai and Beijing have overhauled public restrooms. Anti-bacterial tiles, water-saving urinals and diaper-changing tables were among the priorities of 2005, the official newspaper China Daily said that year.

Those efforts inevitably helped the business of American Standard, a brand owned now by Lixil Group ( JSGRY), and its Japanese rival Toto Ltd. ( TOTDY).

But toilets just cap a huge tangled maze of pipes that China must rework to accommodate more people in the cities. No matter how civilized the eco-civilization gets, investors might expect growth in sales of well-established automotive multinational corporations, such as General Motors ( GM - Get Report) and Ford ( F - Get Report), as people commute from farther-flung suburbs. They should see stable returns from energy-efficient building suppliers including Siemens ( SI) as cities try to minimize environmental impacts while permitting new building construction.

As in cities anywhere, time-pressed Chinese urbanites will prize convenience. That means more business for foreign fast food chains such as Pizza Hut, part of YUM! Brands ( YUM), to name one favorite among younger city dwellers. Car exhaust, fast food overkill and other downtown health hazards make a perfect Rx for an expanding health care industry that is forecast to rise from $357 billion in 2011 to $1 trillion in 2020 (largely because of aging). Medicine in China draws increasingly from foreign players such as Bayer ( BAYRY) and Roche ( RHHBY).

Whatever China does, the UNDP suggests that it not hit the fan.

"Because of the magnitude and speed of the changes underway in China, the window of opportunity for addressing many of the associated challenges is relatively small," the UNDP report says.

At the time of publication the author had no position in any of the stocks mentioned.

Ralph Jennings is on LinkedIn.

This article was written by an independent contributor, separate from TheStreet's regular news coverage.