Ah, they didn't really. The Maginot Line held, and they knew they needed to stop the Germans at the Belgian / German border.
That the invasion of France ended the way it did was a surprise to everyone, including the Germans. Mainly you could boil it down to better command and control all the way from strategic to tactical and luck on the German side and the opposite, bad luck, bad cooperation and bad communication on the allied side.
So, basically like in the 1870s? Back then, the French hat better weapons (guns, cannons and gatlings) and technically even a defence strategy, but bad coordination on both strategic and tactic levels lost them the war.
That the invasion of France ended the way it did was a surprise to everyone, including the Germans. Mainly you could boil it down to better command and control all the way from strategic to tactical and luck on the German side and the opposite, bad luck, bad cooperation and bad communication on the allied side.