This is not so strange a sit seems to us now. Don’t forget roads and road transport in the 1914-1918 war were primitive, especially if it had been bombed. If you wanted to move hundreds of men quickly across open ground for several miles, calvary was the only way.
As I recall, even in the first year of the second world war war, most war tranport in was horse driven.
Besides the issue of the cost, that was a geopolitical no-no. The Belgian government was strongly opposed to such a defensive line being build along its border, since it would have likely meant that the french army would have stayed behind this line in case of German invasion instead of fighting in Belgium. They considered that such a move would have been equivalent to France publicaly announcing she wouldn’t defend Belgium.
Finally, the Maginot line still served a purpose, even unachieved. Being able to block a german offensive in eastern france, it allowed to concentrate the french or allied armies along a shorter front, and limited the german options.
In case this wouldn’t be clear, the german attack through Belgium didn’t came as a surprise. It was what was expected by the allies. They had massed the troops along the border, in order to rush them in as soon as Belgium would be attacked hence would renounce to its neutrality. And the germans in turn had anticipated this anticipation. That’s why they launched a first attack in northern Belgium, to atttract the allied armies into a trap.
The part which took the allied off guard was the main attack in the Ardennes, west of the Maginot line, but east of the area where most of the armies were engaged . It was assumed that the terrain and poor roads didn’t allow for a significantly large attack to take place in this area. This part of the frontier was only defended by reserve troops, which didn’t have any reserve to counter attack once the defense line was pierced (since, once again, the bulk of the army had moved into Belgium). And of course, the “blitzkrieg” wasn’t expected, either, so the allied didn’t think that the german armored divisions could advance so quickly, even assuming they would successfully attack there.