These ideas [of 'thou shalt not kill' and 'love thy neighbor as thyself'] predate Christia-insanity. Most of the tenets of the bible were borrowed from other cultures and religious ideas much earlier.
And the reason that these doctrines were already existent when the Bible was because they were instituted in the first chapters of Genesis (e.g. during Adam's lifetime and shortly thereafter). Biblical principles were instituted in the consciences of men before God inspired the first words of the Bible, and that solves the supposed 'problem' of pre-canon (that is, when the Bible was compiled) ethics. God instilled right and wrong in the hearts of men from the beginning. Some men suppress the truth to a degree where they no longer are sensitive to right and wrong, but God does instill it.
"Let God be true, though every man a liar" (Romans 3:4)