The carmaker installed emissions-cheating software in 2008 after realizing that a new diesel motor could not meet pollution standards, people familiar with an internal inquiry said.