This is hugely important as a lot of people see programming as a ticket into higher-end jobs and will spend as little time as individual contributors as they can. The idea that "oh, they'll get caught in the workforce" is not correct - quite often the plan in the mind of these folks is that they will try to fake their way through and be moved up into project management, technical marketing, etc. and never have their…
The solution is effective hiring. Work sample or project based hiring methods get people to demonstrate their skill-sets. I once had a candidate refer to resume/conversation based hiring as 'ritualized lying'. I think that's bang on. This isn't directly in response to your comment, but... There's an elitist under(over?)-tone within HackerNews that asserts any less-than-engineer technical role is inferior and attracti…
Meh. Hiring is expecting other people to train your employees for you.
It's important to hire smart, driven, forthright people, but if you really want them to, say, write readable code, assign them to read Clean Code, make code clarity part of the regular performance review, add it to the code review checklist, etc.
In my opinion, bigger than hiring practices is a lack of communication up and down the chain of command about the importance of good code, who is writing it, and what are the carrots and sticks involved in making sure good code happens. Most people able to hand out raises and job titles work off secondhand and hand-wavy information about technical prowess at best:
"Yeah, he's really good. Fixes lots of bugs and get asked for help a lot."
Of course, that could be because the code's a big mess and he wrote himself some excellent job security. A non-technical PM would know little about this very common issue.