Plan, what plan, exactly?
The "Schlieffen Plan" did not "prioritize" invading France.
That plan was a relatively short memorandum and solely about invading France, with the matching title "Krieg gegen Frankreich" ("War against France", German transcript of the final Schlieffen version from 1905 with a few additions by Moltke). It was not the one grand plan for making World War (or less pessimistic: grand continental war).
Russia is mentioned only once in this entire document. In the very beginning, Schlieffen reasons:
In a war against Germany, especially as long as it cannot count on effective support from Russia, France will probably confine itself to defence. [[Margin note] General v. Moltke: "France's offensive or defensive behaviour will essentially be determined by the casus belli. If Germany brings about the war, France will probably behave defensively. If, on the other hand, the war is wanted and brought about by France, it will in all probability conduct it offensively. If France wants to reconquer the lost provinces, it will have to invade them, i.e. become offensive. I do not think it is entirely certain that France will behave defensively under all circumstances. The border fortresses, built soon after the 70/71 war, do express the defensive idea. But this does not correspond to the offensive spirit which has always been inherent in the nation, nor to the doctrines and views now prevailing in the French army."]
Schlieffen's was one plan of several, drawn at very specific point in time which only later apparently became more rigid thinking. By chance and accident the military concentrated more and more upon one version of this plan and neglected others:
Schlieffen Plan, battle plan first proposed in 1905 by Alfred, Graf (count) von Schlieffen, chief of the German general staff, that was designed to allow Germany to wage a successful two-front war. The plan was heavily modified by Schlieffen’s successor, Helmuth von Moltke, prior to and during its implementation in World War I. Moltke’s changes, which included a reduction in the size of the attacking army, were blamed for Germany’s failure to win a quick victory. […]
Schlieffen insisted on an immediate attack on France in 1905 as a “preventive war,” arguing that Russia had just been defeated by the Japanese and France was involved in a crisis in Morocco.
— Britannica: Schlieffen Plan
German military considerations in Europe against France
And this is really the mere continuation of the thinking since 1870s. Germany's aim was always to isolate France after it was defeated in the 1870s war — and somewhat 'humiliated by Germany'. Knowing full well that 'taking back' the German-speaking provinces of Alsace-Lorraine was not conducive to a fast forgotten affair and stable peace. France even established a policy of Revanchism:
The instance of revanchism that gave these groundswells of opinion their modern name came in the 1870s. French revanchism was a deep sense of bitterness, hatred and demand for revenge against Germany, especially because of the loss of Alsace and Lorraine following defeat in the Franco-Prussian War. […]
Georges Clemenceau, of the Radical Republicans, opposed participation in the scramble for Africa and other adventures that would divert the Republic from objectives related to the "blue line of the Vosges" in Alsace-Lorraine. After the governments of Jules Ferry had pursued a number of colonies in the early 1880s, Clemenceau lent his support to Georges Ernest Boulanger, a popular figure, nicknamed Général Revanche, who it was felt might overthrow the Republic in 1889. This ultranationalist tradition influenced French politics up to 1921 and was one of the major reasons France went to great pains to woo the Russian Empire, resulting in the Franco-Russian Alliance of 1894 and, after more accords, the Triple Entente of the three great Allied powers of World War I: France, Great Britain, and Russia.
Lacking own allies, but facing multiple allied opponents
Concerning France, this assessment is a little untrue:
Q were little more than opportunistic memoranda of understanding that served only to benefit their respective empires/colonies.
if meant as 'France would probably not go against Germany if the opportunity of a German-Russian war came along.' Then again it is also 'true', as supporting Russia in such a case was exactly in France's national interest.
Germany knew all that very well. As early as in 1877, Bismarck with his Kissinger dictation and all his followers feared that Germany was militarily the strongest player on the European continent, but vulnerable against a multi-front war. The French word cauchemar des coalitions embodied this threat of France allying with anyone, but especially Russia. To counter this undesirable outcome of 'friendship and heartfelt understanding' against Germany, Bismarck devised the Reinsurance Treaty with Russia to keep it out of any possible conflicts. His successors neglected this and did not renew the treaty when it was up in 1890.
After 'letting Russia go' it was embraced by France, and a two-front war almost all but assured. A known coalition between France and Russia, France very eager wage war, for revenge reasons alone, it would have been foolish to not at least think trough the consequences and simply hope that France would remain neutral. France's ties with Russia grew closer with treaties in 1892, 1894 (Franco-Russian alliance) and 1904/1907 (at first Entente Cordiale, then with Russia as Triple Entente). Hence the plan to deal with France in case of war. Any war, almost.
Military planning, including by Schlieffen and successors
The gist of the question seems therefore not isolated on the Schlieffen plan of 1905, but the general strategic plan_s_ of Germany from 1905 Schlieffen up to 1914? In other words: "Why did German military planning insist on attacking France?"
Of course this also answers the subquestion:
Q: Was Germany perhaps for some reason already motivated to invade France before this whole Serbia situation started, and was this little more than a pretext to make that move?
The "Serbian situation" cannot possibly mean the "July crisis of 1914" — as that 'situation', as the entire Balkan was for years then described as a powder keg, with Balkan Wars, and 1912–13: Growth of Serbian and Russian power.
Schlieffen himself saw the Russian military as less of a threat than anticipated and even severely weakened after the Russo-Japanese war in 1904/05. Russia then proved to be slow to mobilise and a theoretical giant in manpower, but with other, numerous problems: of equipment, leadership and logistics. France on the other hand recovered very quickly from the war of 1870 and armed and motivated its military with a much stronger economy as its backing.
Contrary to popular belief, Schlieffen himself did not see a quick victory against France alone at any point in time as a given:
Schlieffen maintained that the German army was numerically inferior to the French army alone; against a Franco-Russian alliance this numerical inferiority became alarming. One needn’t consider a two-front war, Schlieffen wrote in 1899, a war with France by herself would be as much as the German army could handle. Schlieffen understood that excellent German troop training and operational skill could go only so far to compensate for superior enemy numbers; in an era of Millionenheere (million-man armies), masses mattered. In a Denkschrift on 25 August 1889, even before becoming Chief of Staff, Schlieffen wrote that the German army was numerically inferior to the French because, on average, Germany conscripted about 55 percent of her available manpower, while France conscripted about 80 percent of hers. Such high levels of French conscription even compensated for France’s smaller population and lower birth-rate.
— Zuber, p. 139
All sides knew the basics of each others preparedness plans, especially over railways
But the all-out importance of just "railways" is often overstated and on top quite distorted for evaluating the 'badness' of the Russian side on this. The anticipated slowness of the Russian sosredotochenie may have rung true at the very beginning of the 20th century, but as 1914 approached this supposed weakness the Russians and French had identified and massively tried to rectify by building not only a defensive Narew-line of fortifications but also offensively directed railways towards the West:
Nevertheless, in anticipation of the war, European track mileage tripled between 1870 and 1914 to 180,000 miles, the growth particularly marked in Germany and Russia.
— Bruno Derrick: "Railways and the mobilisation for war in 1914", National Archives, 2011.
After the original Schlieffen memorandum, the trend over tracks was still slightly favouring Germany overall as a single entity, with most of the available capacity for concentration found in Britain, and France getting ahead even of Germany, thus within the system of alliances putting Germany at an ever greater approaching disadvantage:
The big trend in strategic railway development in the pre-1914 decades (and one well understood by both sides) was a shift in favour of the Triple Entente of Britain, France and Russia, and against the Triple Alliance of Italy, Austria-Hungary and Germany. This trend, which intensified as war approached, […]
The German military was well aware of French plans to make war with Germany, as well as how armament and logistics developments proceeded in Russia:
By the winter of 1911–12 the German military estimated that Russia's concentration time on Germany's border had halved in the previous five years. Yet for the EMA this was merely a beginning, and from 1909 the French began to contemplate demanding still more building as a condition of approving further tsarist bonds. […]
Only after the 1910 reorganization, however, did Paris achieve a breakthrough. This was due less to French financial leverage than to Russia's reviving economic growth and military confidence, and its worsening relations with the Central Powers. In 1911, Tsar Nicholas II's Chief of the General Staff had committed himself to attack Germany on Day 15 after mobilization and when the French Prime Minister, Raymond Poincaré, visited Russia for talks in August 1912 Joffre picked out railway improvements as the single military item for the agenda. The outcome was a September 1912 agreement for 900 km extra track, mostly in Poland. […]
Between 1876 and 1909 Austria-Hungary constructed five trunk lines through the Carpathians to Galicia and, for a while, it could concentrate faster than Russia. But after the turn of the century it lost its advantage. […]
The German General Staff knew how crucial its railway superiority had been in 1870, and had reason for foreboding. While Austria-Hungary was losing its advantage against the Russians, Germany had already done so against the French.
— David Stevenson: "War by Timetable? The Railway Race before 1914", Past & Present, 1999, No. 162, pp.163-194, 1999. (jstor)
That railways and their timetables were an important part of the developments cannot be disputed. But to see them as any form of direct 'cause' in themselves, or even over-simplistic path-dependency of inevitability seems to be wrong and preferring agency for automatism.
In War by Time-Table, he [AJP Taylor, LLC] interpreted the escalation of the July Crisis ultimately as a result of the military preparations of the major powers, and in particular of the Schlieffen Plan, Germany’s infamous deployment plan. ‘When cut down to essentials, the sole cause for the outbreak of war in 1914 was the Schlieffen plan – product of the belief in speed and the offensive’, he claimed. This was certainly too simplistic an interpretation of such a multi-faceted problem, as John Langdon criticizes: ‘He simplifies a very complex situation to the point of monocausation, in some ways doing to the anti-revisionist position what Harry Barnes did to the revisionist. Taylor was the most prominent writer on the July crisis during the 1950s, but the serious student should look elsewhere for a balanced, detailed overview.
— Annika Mombauer: "The Origins of the First World War. Controversies and Consensus", Pearson Education: Harlow, London, 2002.
Terrain: fortification lines and perceived gaps therein
As a two-front war was now seen as inevitable anyway, and some German militaries even preferring that, it was anticipated that France could mobilise its mass armies still much quicker than Russia, giving Germany more time in the East. Another 'tradition' in thinking was that that the German army just wanted a repeat of the 1870 war: 'quick decisive victory against France was possible'. The vision was always to emulate Hannibal and destroy the enemy in one big battle, preferably before the French might retreat the possible remnants of their army into their line of formidable fortresses (Barrier de fer/Séré de Rivières system).
Abandoned alternatives to 'always attack France'
This quick and easy victory against France within the Schlieffen doctrine was at first complemented with the Big Eastern Deployment plan (Großer Ostaufmarschplan)
There is ample disagreement among historians1 whether all of this planning was really to be interpreted in any of those ways it has been interpreted after 1905, be it in 1914, or after 1918:
A recent study has even suggested that the famous memorandum of 1905 in which the chief of the General Staff Alfred von Schlieffen sketched the outlines of a massive westward offensive, was not a 'war plan' as such but a plea for more government money - among other things, Schlieffen's sketch envisaged the deployment of eighty-one divisions, more than the German army when mobilized actually possessed at the time.
— Clarke; the "recent study" that 'the plan' was 'no plan at all but merely a what-if to get more money for the military in face of impossible odds to emphasize staying defensive in reality' is Zuber, see footnote 1 below.
Actual German plans as they developed
But these almost 'what-ifs' over interpreting the Schlieffen plan itself and the other German plans are of course counter to what developed out of it:
From the standpoint of the most influential German military commanders, it seemed blindingly obvious that the geopolitical situation was shifting rapidly to Germany's disadvantage. Helmuth von Moltke, Schlieffen's successor (from January 1906) as chief of the General Staff adopted an unswervingly bleak and bellicose view of Germany's international situation. His outlook can be reduced to two axiomatic assumptions. The first was that a war between the two alliance blocs was inevitable over the longer term. The second was that time was not on Germany's side. With each advancing year, Germany's prospective enemies, and Russia in particular with its swiftly expanding economy and virtually infinite manpower, would grow in military prowess until they enjoyed an unchallengeable superiority that would permit them to select the moment for a conflict to be fought and decided on their own terms.
There was a fundamental difference in kind between these two axioms. The first was an unverifiable psychological projection, born of Moltke's own paranoia and pessimism. The second, by contrast, though it also incorporated a measure of paranoia, was at least justified by a comparative analysis of the relative military strengths of the European powers. Moltke's concern over the deepening imbalance between the two blocs and the steady deterioration in Germany's capacity to prevail in a future conflict steadily gained in plausibility after 1910, when the Russians initiated the first major cycle of rearmament in land weapons and forces. […]
The next escalation in European war-readiness and armaments investment came in the wake of Agadir and the crisis triggered by the Balkan Wars. In November 1912, as the Russians stepped up their measures against Austria-Hungary and the French government cheered from the sidelines, the German government showed remarkable restraint — reservists were not called up, conscript classes were not retained, there was no trial mobilization. But from mid-November, as the massive scale of the Russian military preparations became clear, the German command grew increasingly concerned. Especially alarming was the retention of the Russian senior conscript class, which sharply raised troop strengths along the German frontier in the Polish salient. And these concerns were nourished by intelligence from a range of sources and locations that the dominant view among the senior echelons of the Russian army was that conflict with Austria was inevitable and that 'the best time to strike was the present moment'. […]
During the first cycle of armaments expansion, it had been the Russians who had set the pace; now it was the Germans. The 1913 army law was crucial to the passage in France during August 1913 of the Three Year Law. And in Russia, the German army law (plus French goading) triggered the schedule of expansions and refurbishments known as the 'Great Programme'. In March 1913, massive sums were approved by the Tsar for artillery and other armaments in a vastly ambitious scheme that would by 1917 have increased Russian winter peacetime strength by 800,000 men, most of whom would (by contrast with the deployment plan of 1910) be concentrated in European Russia. As a consequence, the peacetime strength of the Russian army in 1914 was double that of the German, at around one and a half million men and 300,000 more than the combined strengths of the German and Austro-Hungarian armies; by 1916–17, the Russian figure was expected to exceed 2 million. And in 1914 these measures were complemented by the French-financed Russian strategic railways programme. Since 1905, Germany's answer to this predicament had been the Schlieffen Plan, which aimed to resolve the problem of a war on two fronts by first mounting a massive strike against France, accompanied by a holding operation in the cast. Only when the situation on the western front had been resolved would Germany swing eastwards against Russia. But what if the balance of forces between the two alliance blocs shifted to the point where the Schlieffen Plan no longer made sense?
It has been pointed out that Germany was faster to implement its improvements than its two Entente opponents and that this furnished the German military leadership with a short-term strategic advantage in 1914. And the economic foundations of Russia's military might remained fragile: between 1900 and 1913 Russian productive strength was actually decreasing in relation to Germany's. But the outlook from Berlin's standpoint remained grim. In 1904, the combined strength of the Franco-Russian military had exceeded the Austro-German by 2.60,982. By 1914, the gap was estimated at around 1 million and it was widening fast. In a report dated 2.5 May 1914, the German military attaché in St Petersburg reported the latest enlargement of the recruit contingent (from 455,000 to 585,000) and calculated expected growth in peacetime strength over the next three to four years, concluding that 'The growth of the Russian army will thereby increase at a rate never before seen in the armed forces of any country.' Moltke viewed the Franco-Russian loan as 'one of the most sensitive strategic blows that France has dealt us since the war of 1870–71' and foresaw that it would bring about 'a decisive turning point to Germany's disadvantage'. By 1916–17, German strategists believed, the striking power of Russia would be sufficient to nullify the calculations embodied in the Schlieffen Plan.
Obsessed with the dangers looming from east and west and convinced that time was running out, Moltke became the eloquent exponent of a 'preventive war' that would enable the German Empire to resolve the coming conflict on terms advantageous to itself. He came to view each passing pre-war crisis as a failed opportunity to redress a deepening strategic imbalance that would soon place Germany at an irreversible disadvantage.
Preventive war thinking became widespread within the military command — a recent study has identified several dozen occasions on which senior commanders pressed for war 'sooner rather than later', even if this involved taking the initiative and accepting the opprobrium of the aggressor. It was not just the Germans who saw the matter thus. Early in 1914, Poincare remarked to the editor of Le Matin that the Germans feared the growth of Russia: "They know that this great body gains each day in cohesion; they want to attack and destroy it before it has attained the plenitude of its power." In March 1914, when a summary of a dispatch outlining the improvements made to the Russian army since 1913 was sent to the British director of military operations, Major-General Henry Wilson, Wilson appended the following comment: "LAST CHANCES: DETENTE AND DANGER, 1912–1914."
This is a most important despatch. It is easy to understand now why Germany is cautious about the future and why she may think that it is a case of 'now or never'.
A vein of fatalism underlay the bellicism of the German military. When they spoke of war, the German military tended to speak less of victory than of the 'twin threats of defeat and annihilation'. The danger inherent in such thinking, which allowed commanders to sanction even the most aggressive initiatives as essentially defensive, is clear enough. But to what extent did the preventive war arguments of the military shape German foreign policy? Even in a praetorian system like the Prusso-German one, much depended on the ability of the most senior commanders to persuade their civilian colleagues to adopt their strategic viewpoint. In this, they were not especially successful. Moltke pressed for war 'sooner rather than later' at the Neues Palais in December 1912, but although the Kaiser seemed briefly to endorse the staff chief's view, nothing came of it.
The messages from London set the scene for a violent dispute between the Emperor and the chief of the General Staff. The German mobilization was already underway, which meant that the vast machinery of the Schlieffen Plan was in motion. After seeing Lichnowsky's first telegram, Wilhelm took the view that although the mobilization order could not for the moment be revoked, he would be willing to halt any move against France in return for a promise of Anglo-French neutrality. Supported by Bethmann, Tirpitz and Jagow, he ordered that there were to be no further troop movements until the arrival of a further message from London clarifying the nature of the British offer. But whereas Wilhelm and Bethmann wished to seize the opportunity to avoid war in the west, Moltke took the view that, once set in motion, the general mobilization could not be halted. 'This gave rise to an extremely lively and dramatic dispute,' one observer recalled. 'Moltke, very excited, with trembling lips, insisted on his position. The Kaiser and the Chancellor and all the others pleaded with him in vain. It would be suicidal, Moltke argued, to leave Germany's back exposed to a mobilizing France; in any case the first patrols had already entered Luxembourg and the 16th Division from Trier was following close behind. Wilhelm was unimpressed. He had the order put through to Trier that the 16th Division be halted before the borders of Luxembourg. When Moltke implored the Kaiser not to hinder the occupation of Luxembourg on the grounds that this would jeopardize German control of its railway route, Wilhelm retorted: 'Use other routes!' The argument reached a deadlock. In the process, Moltke had become almost hysterical. In a private aside to Minister of War Erich von Falkenhayn, the chief of the General Staff confided, close to tears, 'that he was a totally broken man, because this decision by the Kaiser demonstrated to him that the Kaiser still hoped for peace'.
— Christopher Clarke: "The Sleepwalkers. How Europe Went to War in 1914", Allen Lane: London, 2012.
As analysed in Fritz Fischer's study about 'German War Aims', the book Griff nach der Weltmacht (Grab for world power) or this answer, any German plans for a unified (middle) Europe under German leadership, almost all long term plans involved at least 'crippling' France, as also seen in the 1912 study by former Schlieffen colleague Bernhardi: Germany and the next War. Despite opposing Schlieffen's particular deployment and concentration ideas, he clearly articulated more flexibility and 3 non-negotiable goals: 1. defeat France 2. unite Europe 3. get more colonies.
Weighing options, or discarding most of them, to get it over with
Already under Schlieffen it became clear that Russia fortified its western regions against any such attempts and also heavily expanded its western leading railroads. This did not change the general assumption that France would be much quicker to show up in force than Russia.
This was the alternative to the aggressive and offensive attack on France:
split German forces evenly between East and West, with staying defensive in the West and demanding a declaration of neutrality from France, while trying to beat Russia militarily in the East. This alternative plan was buried in April 1913 under Moltke, preferring the strategy of a preventive war, based on Schlieffen plan, as both France and Russia were building up arms much quicker than German military anticipated or liked.
On August 1, 1914, Wilhelm ordered Moltke to improvise back into existence the Big Eastern plan, based on his erroneous information and hopes that possibly Britain would remain neutral, if Germany did not attack France. Moltke had a meltdown over this, as all deployment and railway timetables, and really everything in terms of preparation in Germany was only fashioned for this one plan for over a year by then, changes not seen as very impractical, but a sheer impossibility.
This line of thinking was already more or less entrenched in German plans and options since the German Imperial War Council of 8 December 1912:
as a result of the German analysis of the Balkan wars it was concluded that war was inevitable, and the enemies would be Russia, France and Britain, possibly over Serbia, and the growing strength of each of these powers meant that such events are better fought earlier than later.
Preferably as early as summer 1914.
1: The basic dispute is as fundamental as this: one side argues that 'there never was a Schlieffen plan to begin with!' The two sides argue that indeed the short 1905 memorandum was the general master plan to be followed (and often: if implemented correctly as the master mind Schlieffen envisioned it: successful. This presents another division of schools: Delbrück- (wrong plan used) against Schlieffen-school (best plan used but bungled), while the other side maintains that this was a purely private piece of paper, not even included in the military archives but inherited by Schlieffen's daughters, not becoming public after Ritter published it in 19_56!_ (In English: — Gerhard A. Ritter: "The Schlieffen Plan: Critique of a Myth", London, 1958. 'PDF-ified' here.)Thus like the stab-in-the-back myth a post-war invention, at least in terms of its importance for actual planning.
The 'no Schlieffen plan at all' is put forth in full force in Major — Terence Zuber: "Inventing the Schlieffen Plan. German War Planning 1871–1914", Oxford University Press: Oxford London, 2002.
Ample and quite justified criticism of this view and its consequences for analysis are in — Hans Ehlert, Michael Epkenhans, and Gerhard P. Gross: "The Schlieffen Plan. International Perspectives On The German Strategy For World War I", The University Press of Kentucky: Lexington, 2014.
Especially chapters: Annika Mombauer: "The Moltke Plan.
A Modified Schlieffen Plan with Identical Aims?"; Robert T. Foley: "The Schlieffen Plan—A War Plan"; Gerhard P. Gross: "There Was a Schlieffen Plan. New Sources on the History of German Military Planning".