Apologies for the lateness of this one; didn't have time to finish it last night: When we attempt to couch a difficult discussion like this in order to avoid frightening children or instilling toxic ideas about the world, we try to simplify the topic by removing a lot of the nuance, and ultimately end up with something that's even more effective at instilling toxic ideas about the world than the complicated reality was.
So, my real recommendation, whatever you lean towards saying, is to step back and take a little time to meditate on what that way of framing the discussion suggests about the world and the people in it. I will attempt to practice what I preach. Because the motivations are so complex and varied, I don't think it's particularly useful to explore them unless you think your children can handle doing so with a fair amount of depth/nuance. But, I do think it's still a good opportunity to talk about patterns in how people behave, and lay a foundation they'll be able to use to better understand things like this as they grow.
I think it might be nice to start by talking about how we see things differently from each other depending on our own experiences (depending on age, it may be good to help them unpack that our "experience" is a tree watered by things that happen to us, with deep roots in what our parents/family/leaders/friends/society think, what we see in news/movies/books, learn in school, etc.), and how there are almost as many different ways to see the world as there are people in it. It would be great to connect this with how the people involved saw/thought/felt about a recent disagreement in the children's own lives.
If you have such an example, this is an ideal time to talk out how the involved parties misunderstand why the others behave the way they do, but still respond as if they know what what the other is thinking. And how we usually have a story that justifies why we behaved the way we did.
From here, you can talk about how people tend to spend more time with others who see things similarly, and less time with people who see things very differently. You can probably even get them to volunteer some examples of groups like this in their grade at school. Because we see things in a way that feels "right", given our experiences, it's easy to think the other ways of seeing something are "wrong". When we don't spend time with people who see things differently, we never learn how their experiences have led them to see things the way they do.
Instead, we try to imagine how we could see things the way they do--but because we think they are wrong, we'll come up with an answer for how we could believe the wrong thing. Answers like "I must've been lied to", or "I must have been stupid/ignorant/naive/young/impressionable", or "I would have to be a bad person to think like that".
This next turn takes us into the rockiest terrain, I think, because we're starting to touch on feelings I suspect kids will have more trouble relating to. I guess a good place to start is with the idea that different people find different types of violence acceptable. Some people's experience has taught them that violence is never the right course of action, that violence is okay in immediate self-defense. That violence against death-row inmates is okay, or that it's okay to do violence for "noble" causes, or to express anger, obtain vengeance, or even just that it's acceptable to use violence to get what you want. This is a "big" point, so I think it's good to make a lot of connections and examples.
First I would turn this back on the way our "experience" is influenced by long chains of people influencing each other for thousands of years--our cultural history--and explain that different people in different places find different types of violence more or less acceptable based on that history. If it is age-appropriate, you could frame this in terms of how different countries have developed a different sense of how animals should be treated. You could also approach this from a corporal punishment angle. In some countries, it isn't acceptable to use violence to punish a criminal. In other countries, it's acceptable to use violence to kill criminals convicted of the worst crimes (some countries justify this violence by making it as painless as possible; others still use pretty painful means.) In still other countries, it's acceptable to cut off the hand of someone caught stealing.
I would also try to immediately relate the acceptability of violence back to both the disagreement example (all the better if it involved inappropriate violence), and to the way people group together around what we think. Aside from heat-of-the-moment violence, we usually talk ourselves into the acceptability of the violent act before we commit it, but those we commit it against almost always see it as unjust. While we tend to see the violence other people commit as "wrong" because we don't see how they came to find it acceptable, we see our own violence as justified. I think this is an okay time to talk about war, and explain that people on every side of a war feel they are right, and typically that the others are wrong for trying to do them violence.
So, Paris. I think it's okay to say that we can't really know exactly what experiences led each attacker to do it, nor can we know exactly how they justified it to themselves. We can (and many will) try to come up with reasons, but these will just be people who don't understand the attackers trying to decide what would have to have gone wrong in their own lives for them to do such a "wrong" thing. Some people will think that perhaps believing in the same religion or being from the same part of the world might be enough. Other people will imagine causes like having an extremist teacher of their religion, or outrage over the wars Western countries have fought in the Middle East. Tell them what we know:
A group of people who see the world in a similar way found each other, shut out people who don't see things the same way, and convinced themselves that it was acceptable or even "good" to do violence to others. Tell them that the group of people they belong to "says" why its members do violence to others, but remind them that this is part of the story these people tell themselves in order to justify that violence. That the people who make up the group all have their own reasons, based on their own experiences, for being there. That each of these people ultimately chose to shut out other ways of seeing the world and the people who see it in those ways. That the story they tell about why they do this will be hard to understand unless we try to learn their circumstances and experiences.
This is a good time to explain that some people think we shouldn't try to understand those who do senseless violence like this. Explain the obvious: all violence looks senseless if you can't understand how it was justified. Tell them that it's important to try to understand how people felt justified in committing violence like this, because some of those reasons might point to things we can fix about the world. Remind them that even if some of those reasons make sense, that doesn't mean the violence is excusable.
To the future, I think it's good to be honest: something like this will certainly happen again. While I understand the statistics-based approaches some answers suggest, I'm not sure how much statistical reasoning will help at this age. Since that ground has been well-trod, I'll suggest an alternative. Tell them that the chance is very small, but that, if they are still afraid, you can help them come up with some ideas for how they can improve the world in ways that make things like this less likely. The best ways to protect ourselves are to make sure violence isn't the easiest way to get our attention and understanding, and to make sure we don't let people use violence to provoke us into responses which cause even more people to agree with how the attackers see the world.