First off, you should know that this whole
"killing of the bad guy thing" didn't just start when he was reincarnated into this world, he was still pulling this same sort of thing back when he was living on Earth. There's a chapter later on in the WN
(Don't remember which chapter number before you ask) that was from a girl classmate's perspective in which she was kidnapped and about to be raped by a gang. Cid
(His original Earth name is never mentioned) put on his first trial run of the Shadow Lord skit and went to town on the bad guys by - I think - killing them with either a bat or steel pipe. Either way though -
WITHOUT KNOWING ANYTHING ABOUT THE SITUATION OR PEOPLE INVOLVED - he still went and did this what he did and saved the girl. Since we never got to hear his own inner interpretation of what he thought of the situation, we can only guess what went through his mind but sadly, it all essentially still fits with this current behavior. The girl, on the other hand though, thought Cid was a hero for saving her and couldn't understand why he was such a weird nobody in class.
But his behavior all boils down to one thing; he has the
ultimate chuunibyou syndrome. Because of that, you can think of it like this, he doesn't completely live in reality, whether emotionally or mentally. In one way, he's the ultimate actor simply because, for every new situation that happens in his life as Cid, he will create a fantasy scenario all on his own and believe that the people he's interacting with are all a part of that story. Occasionally, he might change the fantasy settings when both the people and situations change beyond what he first believed was happening according to his delusions, but most of what he's created ends up being right at the end, which is why no one truly questions him. Take the first chapter, for example, Cid never outright asked if the people he was attacking were in fact real bandits, but in the WN he assumed they were from all the evidence around him showing dead bodies and lots of stolen goods, which he then used as an excuse to test out his new slime suit and sword. All of his fantasies are basically related to his version of the
"Shadow Lord" and how he as the acting
"Shadow Lord" should behave, which is how he's able to maintain this sort of detachment from both the world and people in it.
If you read the WN though, you'll truly understand that he does somewhat understand the difference between morally right and wrong things to do as the Shadow Lord. For example, Cid never openly attacks anyone with the intent to harm or kill unless they themselves directed such malice towards him first. So if a genuine bad guy does appear before him with open hostility and willingness to kill him, he acts accordingly as the Shadow Lord fantasy in his mind to defend himself and kill his enemies, even if he doesn't know or understand what the bad guy's real intentions are for attacking him. Later on in the WN, there's a scene where Alpha unknowingly sets Delta
(The crazy cat girl) on him while he was acting out a different fantasy role from his usual Shadow Lord act and during the fight, he never tries to fatally hurt her because he knows her as a part of his Shadow Garden girls, thus she's important to his role as Shadow Lord. Delta eventually figures it out that it was him and he told her he was doing a secret mission and then promptly sent her off on a new secret mission. The same type of thing happens later on with Princess Iris Midgar too. In the WN, she needed to kill her own father, the King, because he was under the control of the Diablos Cult and, of course, while this was happening people were trying to stop her so Cid - in another one of his fantasy delusions misinterpreted what she was doing and why - helps her accomplish the act and allows her to escape. Afterward, Alpha does secretly recruit her into Shadow Garden and Iris gains the misunderstanding that Cid planned this all along in order to save her and give her a chance to truly achieve her goal of saving her falling kingdom.
So yeah, because Cid is usually always acting according to his own delusional beliefs on what a Shadow Lord should do, this leads to
A LOT of misunderstanding that somehow - one way or another - causes him to accidentally encounters the real bad guys and since they stupidly show their open desire to kill him, he retaliates in kind. You'd have to read the WN to truly understand it all, but he doesn't always believe the bad guys are acting along with his fantasies. Sometimes, it's more about the,
"Hey, they're going to kill me, I need to defend myself" kind of mentality. Anyways, I hope this helps a little! My own personal recommendation would be to give the WN a chance to really see the inner details of what truly goes on inside his mind. It's honestly quite amusing!