My dungeon master would still let us kill random townsfolk though
That's because tabletop campaigns are usually focused around one small party of characters. Roleplay servers tend to have a large amount of people and oftentimes have rules of engagement to prevent metagaming from undermining the roleplay's narrative.
A problem you run into running roleplay servers is that indiscriminate killing is hard not to police. On one hand, letting players kill each other on a whim allows for more emergent situations, but on the other hand there wouldn't be any sort of textual deterrent for new players joining solely to kill everyone in sight and ruin other people's fun purposely.