As a number of people here and on other posts/blogs have pointed out, there are a number of system-level problems (e.g., elimination of tenure track positions over the last 15+ years) that contribute to people who would like to be in academia not obtaining positions. However, I've also noticed that some (though, certainly not all or even most) applicants are doing things that seem to minimize their own chances. As a result, there are tenure track positions that go unfilled every year:
1) Being too focused on a specific location. In any given, specific location, even large metropolitan areas with a half dozen or more colleges/universities, there are only going to be so many open positions every year. If individuals desiring such a location would be willing to broaden their searches to the regional level (e.g., 8-10 hour drive from their desired specific location) they might be more successful in their search. That said, at the end of the day, being flexible and being willing to undertake a nation-wide search is likely to yield the best results.
When people make being close to family a priority (one that I don't have an issue with), then it seems that they are making it a priority over landing a TT position and are willing to take different career paths to be closer to family. Again, I don't have a problem with this, but it seems that such a personal decision is a less valid reason to complain about the system-level issues affecting the availability of TT positions.
2) Being too focused on a specific type of institution. Institutions are much more varied than the R1, R2, SLAC, etc. terms used to describe them. I am at an R2 that would probably be considered more of a large regional institution. Yet, I would describe my department as having more in common with, though not completely in common, R1 departments (e.g., the faculty are expected to pursue external funding, though it is more about making a reasonable effort to do so than obtaining the grant, though many do obtain external grants from NIH and NSF, with publication expectations of a min. 2-3 papers a year, but preferably 3-4 [with expectations adjusted for area - such as recognizing developmental work just takes longer to do]). My institution is in a semi-rural location, but within easy driving distance to one of the largest metropolitan areas in the country. The only type of research we are not able to support in some form or fashion, at least on-site, is imaging, though we do support EEG/ERP, RSA, and other physio. approaches.
This year, we had a lower than expected number of applications given the number of applicants on the market for several open positions in different areas. Because we only invited 3 to 4 to interview for each position, we had no trouble filling the positions with truly outstanding applicants. Yet, I'm confident that there are other applicants that would have been viewed as being competitive, but that didn't end up applying.
All this to suggest that applicants really need to look at department level factors first, as opposed to institution classification. If the department looks like it will support your work, then consider institutional investment factors (e.g., internal grants etc.).
3) Given how competitive the academic job market is, I don't see graduate students preparing for it from day 1 of their program, despite being told about the job market, and having access to all the information that is out there.
Things that are often overlooked, though some of these items perhaps by only a minority: regularly attending major conferences (to network, see what research areas are up and coming, to get experience presenting their ideas/findings [translates into more prep. for job talks], to learn more about the job market from others that are not at their institution, etc.), focusing way too much on grades (take a handful of B's if it means one publishes even 1, but hopefully 2 additional papers - these 1-2 papers could make a big difference down the road), not putting enough time into research (don't get me wrong, I am all for taking breaks and having a reasonable quality of life, but be mindful that there is a lot to accomplish in 4-6 years of graduate school to be ready to pursue post-docs and then TT positions), a number of mid-level publications are probably okay for all but the most prestigious R1-type of positions (e.g., from the search committee perspective, it is nice to see evidence of high productivity) - but, have at least 1-2 papers in highly regarded journals in your field.
I'm sure I'm leaving some out of this list, so please chime in….
4) apply for dissertation funding (e.g., F31). It looks good that one does so, even if it isn't funded.
5) search committees can "sniff" out fairly well if one has never done a project from start to finish, and only published based on existing data sets. The latter is fine, and it is valued, but having the skills to do a project from start to finish is equally valuable. Applicants with a combination of both are well-regarded by search committees.
6) search committees look for quality, even in papers published in mid-level journals. We see "stuff" and wonder why it was ever published.
At the end of the day, there will, unfortunately, be good scientists that don't end up in the academic careers that they desire because of the well-known system-level issues, and there is some luck involved in landing a TT position. My main point here, and with the examples above, is to suggest that there are some that end up stacking the odds against themselves from the very start. Though there are no guarantees, by being mindful of the advice here and in some of the other posts/threads, the odds of landing a TT position can improve substantially over the course of graduate school and post-doc via decisions that are made along the way.