It is not a hasard to have this kind of laws in France. France hasn't known dictatorship for long. French representatives don't know what a Stasi-like security state would look like. It would be harder to have such a law in Germany.
The low number of delegates during the vote whows how archaic the French politic system is: they are against their own party so they prefer to be missing. There is little discussion. And there is no way to make a petition in France that would go to the parliament or provoke a referendum.
France just shows how current institutions are overwhelmed by new technologies.