"Clearly we get our moral codes from god, how else would we know how to behave?"
How far would the human race have got if murder and theft were considered fine by everyone?
Obviously not very far. By definition, if people had killed and robbed all the time, society would never have got anywhere. Total chaos.
You wouldn't be reading this now on a developed social network whose existence required the development of organised science. You can't be ultra-selfish in a community, or there will soon be no community.
This presents no mystery to anyone but a hapless baboon or a religious person.
Some cultures had no such silly stone tablet rulings yet still evolved into highly moral (and atheistic) societies, such as in Japan and Sweden where the crime rates are amongst the lowest in the world.
There is just no sense for an all-powerful being to prescribe ludicrous rules regarding the the treatment of your 'property' such as wives and slaves, procedures for animal sacrifice, or prohibitions on eating pigs and shellfish.
Just don't make pigs then.