That’s a good point. Unfortunately, teachers are paid nowhere near as well as they should be, and it means competitive fields end up struggling to find people willing to teach them.
That said, there are some programmers and developers who aren’t exactly earning as much as they could be (usually thanks to working in either systems development for non tech corporations or in startups with less money going around), so perhaps some of them might be persuaded if teaching salaries got up a bit more.