Teacher retention affects more than just students. It affects taxpayers too.