Your title is a bit misleading. It's not one tunnel or an interconnected tunnel network. And most of the tunnels are pretty short. No more than 50 meters most of the time.
The most common explanation is that they served some religious purpose, but many archaeologists are very happy to label all kinds of things religious and ceremonial when they don't know what else to call it, so who knows? There have been very few artifacts found in them. We'll probably never find out.
("Ceremonial" is often archaeology speak for "we have no idea what the fuck this was for.")
My favorite thing is when archaeologists dig up female statues with big breasts and wide hips and call them evidence for a "cult of fertility". I guess that sounds more sciencey than "porn".
The equivalent to this I know of are located outside of central europe, specifically Ireland. Located in and under church grounds and graveyards they were used to hide/store valuables during raids, if not the congregation in like the 6th century.
This was according to the local priest in deep rural donegal, mind you.
No one read the article, but every suggestion in the comments are already dismissed by more educated experts.
My guess is that since it typically had a bench at the end, it was used by people to consume drugs/mushrooms in a ritualistic event and exit as a form of rebirth while still high as fuck.