Well, I think DOS had 2 problems:
- There were no negative consequences for killing everyone after you have finished all quests in the area
- The game is very level dependent and people drop everything you have ever sold them ( At least in part 1, not sure in part 2 as I did not kill merchants there)
Killing random people is not needed to finish both games, but doing it after finishing all quests gives you some profit (exp and items) without any downside.
After leaving fort joy, nobody cares if you killed everybody there or not. Same for the other regions.
For BG3 I would say:
- Killing people in a town will shift your alignment towards evil, unless they are hostile from the beginning, combat starts after a dialogue that make it clear you have a reason to fight or they belong to a group that is hated by most people in town (like you fight bandits or cultists).
- Killing townspeople gives you the mass murderer tag. Most people will fear you, some might respect you more and others might give you a job because of it.
I admit that even BG1+2 was sometimes inconsistent too.
Many people in a town would be considerer townspeople and killing them would be considered bad while others were considered as combat encounter, so killing them would not result in reputation loss even if you attack them first, even if they would not attack you by themselves or you could avoid combat with talking.
It feels strange when the game says its bad to kill people, but killing this and that guy is totally fine.
In some inns there were some adventurer groups that attack me when I stand in the room long enough.
Imagine a judge tells you this: "OK, so you broke into somebodies room and you were staring at them until they attack you. Its totally fine to kill them then because they attacked first. Its even fine to attack them first because they would have surely attacked you when kept standing there after breaking into their room."
This reminds me of the western "the great silence" and a quest in Morrowind: You insult or annoy people until they attack you, then you can legally kill them in self defense.

Prof. Dr. Dr. Mad S. Tist

World leading expert of artificial stupidity.
Because there are too many people who work on artificial intelligence already