In what town was that?In guarded towns guards won't kill the person who killed you if you weren't protected.In unguarded towns anyone can kill you without consequences.It might be that it happened in a few blind spots such as an area in SF, the tanker or perhaps some other spot if there are more.Sometimes people kill all the guards in the Hub oldtown and than kill anyone who enters.The only way to become marked as a thief is to fail at a steal attempt.The thief becomes unprotected and can be killed by players.
If you were afk, someone could push you to doorway, so for blocking path you could become unprotected.
sometimes you can block a doorway without noticing. you might have stood in the doorway of a brahmin cage (i don't know if it is called so) or you might have waited on the doorway of a store or bank while waiting for a customer to finish his trade etc. unless you are marked as a thief after an unsuccesful steal attemt, generally there is no way for other players to know you are unprotected in that town (unless they saw the guards saying "venraga stop blocking the doorway for others". in order to see that, the guards must be in their sight range so it is not a very high possibility). just don't tell anyone that you are unprotected and there will be no problem.