Please dont quote scriptures when you dont fully understand the meaning. The word kill translates different in the hebrew text which is the original text for the bible. Kill translates as murder or premeditated murder. Also god is sovereign in what he does and has righteous indignation. Thats why alot of christians these days are for the death penalty.
God can do whatever he chooses to do. He made the commandments for us to follow. He wasnt making guidelines for himself. God is perfect and just in what he does. You cant correctly know the meaning of some scriptures without translating it back to hebrew. So dont give me that ok?