Devaluing the currency is great for exporting countries, but remember that China's official plan is to develop a consumer based economy. People who use a devalued currency have no purchasing power and inflation can become a huge problem for growth.
If that were actually their plan they would be strengthening their safety net. The Chinese savings glut (and lack of consumer based spending) is driven in no small part about fear of getting ill, growing old poor, etc.
Ever if you adjust for purchasing power parity GDP per capita in China is a fourth of that of the US. It doesn't seem unreasonable to assume that they would like a higher standard of living.