The U.S. Justice Department and attorneys general for a dozen states reached an agreement to settle a legal matter with one of the nation's largest for-profit education companies.