Why do they build them that way? Because of ghosts. Did you know that spirits can only travel in straight lines? Well, according to Chinese tradition, anyway. Sure, they might be evil spirits, but they're Chinese evil spirits, dammit, and they are going to do things by the book. None of this individualistic zigzagging and newfangled "turning." No sirree, we're just going in traditional straight lines like we've been doing for thousands of years, thank you very much.
They're also afraid of fireworks. Goddamn, do we have the stupidest evil spirits ever.
That's the explanation given for many curvy roads and paths in China, and the fact that it's easier to curve the roads to follow the contours of hilly terrain is probably just a coincidence.
This is an actual military road in China. I'm sure it's completely ghost free.