General Motors' deadly ignition switch flaws emerged from an effort to improve its cars.