Most language-learning resources seem to focus on dialects spoken in a capital city or some similar commercial hub. Is this always the best starting point, or are there other factors that should be taken into consideration that may mean other dialects would be a more suitable focus? Does anyone know of any languages where learning the dialect of the capital should actually be avoided initially?
There is no thing like "should" in the context of learning foreign languages.
Each dialect has its own beauty/usefulness, otherwise they were extinct by now.
However, learning the standard, official dialect of a language seems to be the best practice for the beginner Language Learner (LL). Note that the official dialect is not the same thing as the "most popular language of the country's capital". One vivid example is German language, as another answer suggests.
This is why the official dialect is better for a beginner LL, comparing to other dialects of the same language:
- there are more learning materials available;
- most citizens of the target country know the official dialect (in addition to their local one);
- hence, a LL may have more partners to practice or communicate with;
Once the LL is more or less familiar with the official dialect, their interest to some other dialect of the same language may naturally appear.
It all depends on your goals. If you are going to move to a particular location where the dialect you want to study is spoken (or if you have some other incentive to study that location's dialect), you should probably do it.
If you want to be more versatile and be able to talk with people from basically anywhere, then it's best that you choose a more neutral variety. If you prefer to learn a standard dialect and your target language has several "standard" dialects (as it is the case for French, German or English), choose whichever dialect that you like best, or that you feel will be most useful given the use you'll make of it.
And even if your goals change later down the road (e.g. if you suddenly get to work a lot more with people with another dialect than the one you started with), you will probably be able to either adjust your dialect or just keep the same while still making yourself understood.
Thou shalt NOT learn Swabian, the dialect spoken in Berlin, the capital of Germany.
EDIT: This is answer has two sides. The serious side is that the Standard German in Germany is not identical with any German regional dialect (even though there is a "long-standing de facto standard pronunciation" which "is similar to the formal German spoken in and around Hanover"). Not only that, but as you can see in the same Wikipedia article, there is actually not only one version of Standard German, but three: "German Standard German, Swiss Standard German and Austrian Standard German" (the first being the Standard German for [the Federal Republic of] Germany).
The not so serious side of the answer is that it's very tongue in cheek - I was trying to make my fellow Germans smile (I hope I didn't offend anyone). The pun being 1) that the traditional dialect of Berlin is not Swabian but Berlinerisch and 2) that there have been tensions between some of the local populace and the Swabians (Schwaben) who came to Berlin after the German unification (the term 'Schwaben' also "being used as a Synonym for all sorts of well-to-do west-German immigrants").