My guess is one of the pilots wanted to commit suicide, however, the thought of plunging the plan straight into the ocean may have been too traumatic. Therefore, the pilot punches in new coordinates to ensure the plane runs out of fuel over the India ocean instead of some populated area in Northern China. He punches in the coordinates, turns off the oxygen supply and everyone dies from oxygen deprivation instead of a traumatic death of nose diving into the ocean. The plane is then in a Payne Stewart type situation where it is on its on course and plunges into the ocean only killing those on board.
Still so many questions as to why not just kill yourself and not others, but who knows what goes through people's heads.