Random Thought

if the thou shall not kill is supposed to be lived by how is it okayto approve capital punishment? Killing in wars? Self-defense cases? If thou shall not steal why is it okay for police to use ceased drug money to buy new cop cars? Does that mean that the commandments are okay not to abide by these days?