An impossible question to answer simply, but to provide a simple answer, the reasons were psychological and strategic. The French were well prepared to re-fight the First World War, but psychologically the massive, massive loss the French suffered in that war also reduced their ability to unite and fight the Germans.
France's main aim was to avoid the harm she had suffered in 1914-18, where she lost millions of young men, huge tracts of her most productive land, and incalculable treasure. She therefore put a massive amount of her defence budget into the Maginot Line, after Verdun seemed to vindicate the idea that modern fortresses, properly manned, could hold off attacks for long periods. This had an opportunity cost in tanks, planes and other weapons.
Once the Germans managed to outflank the Maginot Line, they were that bit better prepared for fast-moving warfare... and although the victory was thorough, it was only due to a small advantage in the organisation of mobile units (as all-arms formations with the motorised elements dictating the pace) and the mindset of key commanders.
Once they'd broken through, the French struggled to bring forces to hit the German spearheads at the right place and time. Most French units were defeated not in combat, but by maneuver, and by the commanders being confused and demoralised.