Congress created the grants in response to a shortage of qualified teachers. Eight Democratic-led states said the grants were improperly terminated.