It was a combination of factors.
One thing that’s very overplayed is the Maginot Line; the line of fortifications that France built along its border with Germany. In the popular imagination people often say that the French sat behind the Maginot Line and the Germans went around it through Belgium, but that’s just completely false. The French in fact built the Maginot Line to force the Germans to go through Belgium. The French sent their best forces and tanks to Belgium when the Germans attacked.
But what happened is that the Germans took a big gamble that paid off. Belgium can be roughly divided into two parts:
- The northern plains, where most of the people live. Good roads, good tank country.
- The Ardennes forest, which is less populated. It’s not just a forest—it’s also got tons of hills and cliffs. Poor roads.
So the French assumed that the Germans would attack through the northern plains. It was the sensible thing to do—the French knew that the Germans were very good at tank warfare, and it made sense for the Germans to attack on good tank terrain. Also, a German army officer carrying the original German attack plans—through northern Belgium—had to do an emergency landing in Belgium, and the Belgians managed to get a hold of these plans and send them over to the French.
The Germans in the end decided to send their main attack through the Ardennes; to fool the French, however, they started by attacking northern Belgium to make it look like it was their main attack. The French didn’t figure out the trick, so they sent their best forces to meet the fake German attack; in the meantime the best of the German forces went through the Ardennes mostly unopposed and ended up attacking the worst of the French forces, the ones defending the sector that the French assumed was the safest.
That part of the explanation is called strategic surprise; the Germans managed to fool the French about their plans, and the French Army’s best forces just ended up in the wrong place. A powerful army is no good if it’s in the wrong place at the wrong time.
But what most people don’t understand is that if the French had figured out the Ardennes trick in time, the Germans would have looked like total morons. The Germans’ Ardennes move, for example, caused the worst traffic jam that the world had ever seen up to that point. Most German officers hated the plan. Hitler did like it; Halder (the military boss at the time, who’d been plotting against Hitler) thought privately that the attack on France was stupid, and that he’d rather pursue a plan that meant either quick success or quick defeat, instead of the northern plan which would mean a long war that he thought the Germans would lose at enormous cost.
Strategic surprise isn’t the whole story, however. People often say that the French were trying to fight World War I again. Both sides knew that the war was going to be different than WWI: tanks and airplanes. But for the most part the officers in neither side knew exactly how it would be different. However, the German Army’s training was better suited for these new situations. German training emphasized improvisation and initiative, while French training emphasized following orders.
So the Battle of France was a bunch of unexpected situations for both sides; the thing is that the Germans were able to improvise, while the French basically became paralyzed and unable to counterattack effectively once their grand plan to stop the Germans in northern Belgium was shown to be less than relevant. (Paralysis actually also happened to the Germans briefly; at one point one general managed to convince Hitler that the army was advancing too fast, and Hitler ordered them to stop for a day or so. Without this pause, the British might have never escaped from the battle.)
The French also had the problem that they had to coordinate with the British and the Belgians. Bad communication prevented some counterattack plans that might have saved France.
Another one: the French had more powerful tanks, but the Germans knew how to use their tanks better. One big aspect of this is that nearly all German tanks had radios, but the French didn’t.
Yet another one: the Germans had better close air support. German army officers could much more easily radio in requests for bombers to come and strike targets of their choice. The French held a lot of their air force in reserve for the fight, while the Germans went all out with theirs.