All the turns were pre-programmed into the autopilot. The altitude changes were caused by a struggle for control of the plane. At some point the plane was depressurized killing all on board. With no one to fly the plane, it flew in a straight line for 7 hrs, ran out of fuel, and fell into the deep southern Indian Ocean.
A botched hijacking with the target being a building in Kuala Lumpur.