I've found many of the attitudes towards WWII history to be tainted by my high school teachers who just liked to relish in how the dough boys saved everyone's behind. The Maginot Line was always brought up as "this silly thing France thought would work". Was it a waste of resources, or at least worth it to create a road block for the inevitable war machine?
Borrowing from an earlier answer I wrote up.
Well here is the thing, the Maginot Line mostly worked the way it was expected to.
Early on, there was some hope that the Belgians would extend the line up to the border of the Netherlands, but that never happened, and Belgium eventually returned to a policy of stated neutrality in 1936.
But the expectation was never that the Germans would plan on a frontal assault of the line. The plan had always been: A, to present a defensive posture of the French and demonstrate they didn't wish to be the aggressor and B, to funnel German forces into a smaller area, Belgium most likely, to be dealt with (and this also might help draw the UK in like it did in WWI, so... bonus). The moment the Germans entered Belgium, the plan was for the French (and hopefully British) to move in and fight them there.
And the Maginot Line did that. It forces the Germans to concentrate their attack north of the line. The problem was that French planners assumed a similar line of attack as in the First World War, with the forces sweeping north. When Germany entered the Low Countries on May 10th, the best units of the French and British military crossed into Belgium themselves, intending to meet the force and defeat them. But the allies were mostly too far to the north! The Germans, defying expectations, concentrated their advance in the Ardennes, which French military planners had assumed to be essentially impassable, and that any German attempt through there would take weeks. Instead, the Germans crashed through quite quickly, and in little more than a week, had reached the coast, trapping most of the BEF and the cream of the French military in a pocket to the north, cut off from the rest of France. We all know how it played out from there, with the retreat to Dunkirk and Operation Dynamo, and the rest of the British forces outside the pocket quickly began an evacuation as well.
By early June, the British had mostly left the continent, and the French surrendered after little more than a month of fighting. the Maginot Line actually held out to the end in most places, even with the Germans attacking the weaker rearside. Many commanders were unhappy that they had to lay down their arms when the armistice came about. And compare the German invasion - avoiding the line - to the Italian invasion, which was head on against the Alpine Line. The Italians suffered extensive losses, despite the garrisons of the Alpine Line being second rate troops compared to those sent into Belgium. The feeling of many was that they could have held out nearly indefinitely had the Germans not forced a surrender.
Now, is that to say that the Maginot Line was a good idea? Probably not! The huge downside was that the Maginot Line was a huge money pit taking up part of the French military budget. That's money that could have been spent on other things which would have served France better. Although the French outnumbered the Germans in tanks and guns, they hadn't concentrated as much on mobility, nor modern armor tactics. For instance the 2.5cm anti-tank gun was heavy, unpopular, underpowered, and often still horse drawn, yet most divisions were still issued with it. The much better 4.7cm gun had only been issued to 17 divisions of ~100 French divisions at the time of Battle of France. They had nearly twice the number of artillery guns as the Germans, but they didn't have mobile artillery, and it proved to be not nearly as useful and decisive as they had hoped. The Germans, which much less, made much more effective use of their guns.
They had a few superb examples of tanks like the SOMUA S35, but there were less than 500 made, they were outnumbered by stuff like the Hotchkiss H35, or the super slow Renault R35. And regardless, their tactics were outdated - leaning towards the infantry support role instead of fast, speedy things, and the tanks lacked even radios in most cases! Likewise in the air, awsome stuff like the Dewointine 520 were in much smaller numbers than the flying target known as the M.S.406.
Now, had the French spent more time and money on building awesome stuff could they have repulsed the invasion? dunno... thats /r/HistoricalWhatIf territory, (and of course we also assume that it was accompanied by a massive shift in tactical understanding) but I can say for certain that they could have done more to prepare, and give themselves a better chance.
Honesty, the problem with the Maginot Line is that it was a static defense and unable to respond to a Germany flank. With that said, I wish to explain a few things.
First, France had a recruitment problem. During the inter-war period, the French military was having problems with filling the ranks due to the massive population loss from the First World War. With a smaller military than they would want, the French needed to make a defensive measure to protect themselves from Germany aggression since they were unable to attack.
Two, France was the Nation of the Attack. France had a notion of a national military identity before Prussia was a Kingdom. The French prided themselves as being the bravest and most aggressive people on the battlefield, but foolhardy bravery led to many deaths in the Great War, so there was a damper on the military mood. To further exacerbate it, France didn't have a military with enough men to act aggressively in combat
So, that's why the Maginot Line was made, to act as a defensive buffer to a restrained military tight for man power.
As for your teacher, it's easy to be an armchair general well after the fact. I'd suspect he also has the "French surrender monkey" trope running in his thoughts because the French made something that didn't work as planned because the events didn't go that way.
So this is a pretty big topic and entire books have been written about it but the school of thought I subscribe to is as follows, also doughboys were WWI not WWII.
The concept of the Maginot line developed from France's experience in WWI (and to a lesser extent the Franco-Prussion War). In the Previous war static defense and a large ready reserve proved to be effective and having won the previous war the French military establishment (which effectively ran the country) doubled down on these concepts. France did not develop a (relatively) small, highly professional army like that of the UK or Germany after the war and instead retained an enormous reserve that took weeks to mobilize. The Wehrmacht on the other-hand (there are going to be a lot of generalizations right here so don't lynch me) was forced to innovate in terms of size restrictions and technology. They knew they had to get the most bang for their buck and they took the lessons of the previous war to heart and adopted military innovations like the tank to a much more effective degree. France had tanks as well but they were regarded as an infantry support weapon as opposed to an entire separate means of maneuver. This is more commonly known as the Blitzkrieg. The Germans also adopted new and innovative command and control techniques that afforded much greater responsibility to subordinate commands allowing them to exploit break throughs and more or less were the first to utilize the "intelligence pull" method allowing them to change in which newly acquired information was rapidly integrated into the overall plan allowing commanders greater flexibility. France on the other hand retained a very old fashioned and rigid command structure which is partly what led to them being paralyzed during the German invasion. Fench commanders simply weren't able to respond in any meaningful way. There are of course exceptions to this and several notable example of stiff french resistance but overall the command structure of the french army was inept in the face of rapid German advance.
So how does the Maginot line fit into this? Well this was the static defense aspect of the French war doctrine. They wanted to create an enormous impermeable barrier and concentrated on the newly acquired Alsace-Lorraine and the rest of the border with Germany first. The idea wasn't even necessarily to completely cut off access through Belgium at some future point but rather to rely on the underdeveloped nature of the region and the Army's maneuver elements to fight the Germans there. Unfortunately the French became so enamored with their series of forts and redoubts that they allowed the maneuver element of their armed forces to whither rendering it highly ineffective. The french also lacked anti-armor capability. They had tanks of their own and anti-armor equipment but not nearly enough of it nor the experience necessary to stop a rapid armored assault. French soldiers probably would have been effective at stopping a dismounted infantry assault but they had no idea how to stop a rapid advance led by armored columns.
The line itself was not foolhardy or a mistake though. The line did its job really, the Germans didn't attack it, they simply went around it but France lacked the ability to launch an effective counter-offensive. To barrow an analogy from Robert Leckie, the French concentrated to much on the shield and allowed the sword to rust.
As far as sources for all of this I can't point to anything in particular because its so generally but I can say that my ideas are primarily inspired by Robert Leckie's Delivered From Evil (who borrowed from many others) and John Keegan's works.
A biggie that's often missed is that the Maginot Line was not finished.
(Edit: I should clarify - it was "finished" but according to somewhat reduced plans. Read below.)
CORF ("Commission d'Organisation des Régions Fortifiées", commission for the organization of the fortified regions, the French defense organization charged with planning, constructing, and maintaining border fortifications) essentially ran out of money around 1936-1938, forcing a scaling back of the original extensive plans. The "completed" line of 1939 was a reflection of these reduced plans.
This means that in the major fortified sectors (south and west of Luxembourg mainly), the network of "Gros Ouvrages" (large works, the huge fortifications we usually think of when referring to the Maginot Line), were mostly completed. However, some GOs were either not completed or turned into Petits Ouvrages (yup, small works). This is also part of the reason why much of the Northern sectors facing the Belgian frontier was inadequately fortified, rather than French naiveté about the impassability of the Ardennes.
The Maginot Line was divided into sectors; the Alsatian sector facing the Rhine river, for example, consisted mostly of small bunkers and machine gun positions, which were easily brushed aside in the late stage of the German offensive. Notably, none of the GOs were taken by assault, although several POs fell. Given the speed of the German taking of Eben Emael in Belgium, a fort of similar size and modernity, it's interesting to speculate whether they would have been capable of taking a GO, although this was tried in several cases and failed. By June, the GOs and remaining POs and supporting fortifications were abandoned in response to Maxime Weygand's declaration of surrender.
Equally important is the often overlooked fact that the _Maginot Line was never intended to be a purely static defense. It was always clear to the French army that this would not work, so the arguments about it being an anachronistic white elephant are not really correct. The line was designed to be backed by mobile reserves of artillery and armor, as well as air support. The French reserves and air force were thrown, often piecemeal, into the northern theaters of the Battle of France, first during the French retreat from the Belgian frontier, and subsequently during the week following June 5. They were defeated and broken up, leaving the fortresses unable to respond to breakthroughs.
So the Maginot Line may very well have been a good investment - especially given the fact that the German army of 1940, far from being the mechanized juggernaut of popular imagination, was still a largely horse-drawn affair with a number of well-coordinated units and talented commanders, and the elements of surprise and numbers, facing a French army that had mostly not yet grasped the realities of combined arms operations and mobile warfare.
Incidentally, if you're interested, I have a few photos up of two that are still accessible here and here. They give you a good feel for the size and scale of these things, they're incredible.