I was listening to Dan Carlin's podcast and he describes how the German forces were miles from Paris as they pursued French and British forces during the great retreat. But instead of marching into Paris, they tried to go around it from the east and exposed their flank to the French army in Paris. He does not explain why they did this. Can you?
I've written on a similar topic before. Hopefully the final bit helps you;
This is actually precisely how the Germans would throw away their successful offensive. In early September the Germans would be on the outskirts of Paris, also squared in purple, and had the entire French army on its heels. Or rather, "on its heels." They had an option then -- siege the fortress of Paris or continue to pursue the French armies, push them further Southeast into the 4th-6th armies sitting on the French/German border and completely encircle everyone. The latter would require basically ignoring Paris and considering even minor forts took a significant amount of time to subdue and it would take days if not weeks to move the super heavy 205mm artillery necessary to even think about sieging Paris, the Germans opted to completely ignore it and continue pursuing the French. This was a horrible option. The Parisian forces would notice that Bulow's Second Army had given them their back as they turned South and Kluck's First Army was separated from the rest of the pack just North of them too. They, along with the entirety of the British Expeditionary Force, would pour out of and around Paris into this gap and nearly encircle both the 1st and 2nd German armies. This is why they sieged all those forts before and it's why people have been sieging forts since the beginning of time.
Ultimately the Schlieffen Plan was centered on an antiquated mode of thought; one thoroughly planted in the 1870 war with France where half of the French army was encircled at once and then the other half, with the French king Napoleon III, was encircled at Sedan. While those armies numbered in the hundreds of thousands it just was not fundamentally the front-wide, persistent fighting style of war that would come into shape in the 20th century.
The Germans, in any reasonable interpretation or reinterpretation of events, could not properly apply the Schlieffen Plan because of this reason. It made numerous assumptions that were just not true and, in the reality of the situation, assumed logistical and battlefield dominance that necessarily was not true any longer. When the Germans reached the outskirts of Paris, as Dan describes, they were in a tricky situation: The French weren't being crushingly defeated at every turn and were running with their tails behind their legs; they were withdrawing deliberately and attriting the Germans. While in the opening days of the war the French light field guns would be outnumbered by German heavy guns 2:1, by September 5th (the opening day of the Marne), that number had flipped entirely to the French having the artillery advantage. Further, Kluck and Bulow's forces (the tip of the spear, so to say, who were around Paris) along with Hausen's 3rd Army (which was in support) were greatly depleted from the aforementioned attrition; 50% strength was not uncommon.
So now the Germans are presented with two equally horrible options. They can pursue offensives with regard to Paris but that simply holds up the offensive. It would take weeks to bring the necessary equipment up as Paris was an enormous fortress; Antwerp would last for weeks under siege long after everything around it had been taken and Paris would take even longer. Continuing encirclement of the French would be a good option but it would expose the flank, as you mention, to the Parisian garrison. However the Germans had very good reason to believe Paris was basically useless as a strategic landmark; basically it would only take a token force to attrit the Germans and defend it and lengthen the war and the struggle to overcome that would not justify it when such a (perceived) small force could do little damage to their flank. Turns out the French thought differently and had about 150,000 men, an entirely new 6th Army, of not garrison bush league troops but battle hardened badasses waiting in there siphoned from across the entire front. So when that flank was opened they would be done for.
So basically the two major generals leading the offensive could not coordinate with each other, were at constant personal odds with each other, and their commanding officer made no effort to reel them in or get them into operating in tandem. This constant butting of heads lead to inconsistencies in how both of them approached these critical days of battle (Bulow was far more defensive and cautious, Kluck was far more aggressive and risk taking) and when the French made their stand at the Marne the German army was in so much chaos that a gap opened up between the German lines and the Parisian garrison and the BEF poured in.