The map https://en.wikipedia.org/wiki/Battle_of_Verdun#/media/File:Battle_of_Verdun_map.png shows the site of these fortresses.
The wikipedia article describes the (artillery-era) modernization of these forts as beginning in the 1880s with the addition of steel-reinforced concrete. Did they expect a war with 20 years of foresight? Or did they simply distrust everybody and want lots of defenses as part of some grand strategy?
It seems unusual, using this year 2017 as an example, that people might suddenly start constructing fortifications because something might happen in the year 2040.
What was the mentality at the time?
Verdun has always been strongly fortified; the very name comes from an ancient Celtic name meaning 'strong fort'. The city held great strategic importance as a potential crossing of the Meuse river, so it made sense to fortify long before the Prussian/German-French rivalry became a fixture of European politics.
It's important to remember that WWI didn't just happen out of the blue, either; Germany had invaded and devastated France during the 1870 war, besieging Paris and laying waste to much of the land north of the Loire river. Being able to hold a defensive line along the Meuse river would hopefully prevent this from happening again, and so it was essential to modernize the key fortresses on the river.