Yeah, this is not, at all, a stupid question. It’s not an easy one, though.
Yes, some people do enjoy hurting others, but there are a lot of other possible reasons.
People will resort to violence if they feel that’s the best way to achieve their goals. Sometimes their goals require violence, sometimes they don’t see any alternative, and sometimes they have genuinely exhausted their other options. Also, some will abandon their goals rather than use violence to achieve them.
When you’re writing a character, you need to know what they want, and how far they’ll go to achieve it. Once you have that, you can then decide if it’s appropriate for them to use violence.
Actually, let’s step back and look at this as a character clinic. You need to know who each of your characters are before you write a scene with them. There’s a lot of ways you can go about this, but ask yourself, “what does your character believe?” or “how do they view the world?” and “what do they want?” Once you have a vague idea of those answers, you should have a much easier time deciding what they should do in a given scene.
Also, when you’re asking questions like that, don’t be afraid to add more questions. Each answer will give you a better grasp of who your characters are, and open up more options in your writing.
Okay, so, when will a character resort to violence? When they feel it’s necessary, or when they want to. Someone who views themselves as the most important thing might not see anything wrong with harming others. Someone who enjoys control might enjoy inflicting pain. Someone who sees an imminent threat to something or someone they’re protecting. Someone who feels they’ve been marginalized and disregarded might resort to violence to “prove themselves”. Someone who’s afraid, and wants to hide it might resort to violence or aggression to mask their own fear. An adrenaline junkie who gets off on the rush might use violence to get their fix.
And, this isn’t an even remotely exhaustive list. There are a lot more possible reasons. Also, most of these aren’t mutually exclusive. A character could be both an adrenaline junkie and have sworn to protect someone else, for example. A character could see their cause as the most important thing, and anyone who dies along the way is just a necessary sacrifice.