The statement from the Munich police [2] says that protesters were taken into custody for their acts, namely blockading traffic. The length of the detention was apparently extended by the district court, but the statement does not give a reason for it. Presumably it's connected to the belief that they will continue to carry out similar acts if released.
I'm a bit conflicted here; if someone is being detained pre-trial for a crime, then "they are going to crime again" is a totally valid reason to hold them without bail pending trial. But it's not clear whether that is what is happening here.
Although I am writing from a US perspective, I don't think I'm saying anything that is really specific to US law; this is more my general feelings around the limitations of police authority and how it intersects with civil liberties.
I don't know if my understanding is correct, but I can't find direct evidence that the "preventative detention" law is actually being applied here -- I don't see any evidence of stormtroopers raiding people's houses and taking them into custody; just people who have already committed (minor) crimes being detained past the point of what some people would consider reasonable.
[1] https://letztegeneration.org/blog/2023/09/liebe-und-wut-brie...
[2] https://www.polizei.bayern.de/aktuelles/pressemitteilungen/0...