Societies do not punish some homicides and accept others to "improve the human race", as you wrote here:
Of course they do. They may not speak of it directly, but they allow/encourage homicides that are "good" and punish those that are "bad". Thus leading to an environment where society can flourish.