If we're doing honest self-reflection as an industry, another reason I see programmers job-hop is because they don't want to sleep in the bed they made.
There may be some of that but that hasn’t been my experience. Most of the time it’s because of comp or as another poster reminded me, bad manager. If people are leaving because they coded themselves into a corner, the code review process where you are is broken.