Actually it's not always. "Thou shalt not Kill" is a poor translation, a better one would have been "Thou shalt not Murder". Many kinds of homicide, such as killing in self defense or killing enemy soldiers during a war, are not murder.
You are correct of course.