As MikeHalloran already mentioned, magnesium is considerably cheaper: Mg costs ~ $2/kg in bulk, while Ti varies anywhere from ~ $15-100/kg. Almost all magnesium automotive applications are high pressure die castings, which is a low-cost, high productivity process. Almost all titanium parts in the world are made by high-cost, low productivity processes: machining, forging on hydraulic presses, etc.