Maginot line intention was to stop enemy troops from passing through, and they thought that by leaving it behind it would've given them higher advantages
The German army simply went around, catching the French forces off guard and devastating the only fighting force which stood a threat, thus allowing the Germans to take most of Europe before the allies intervened