During Hosea's lifetime, the kings of the Northern Kingdom, their aristocratic supporters, and the priests had led the people away from the Law of God, as given in the Pentateuch. Forsaking the worship of God, they worshiped other gods, especially Baal, the Canaanite fertility god. Other sins followed, including homicide, perjury, theft, and sexual sin. Hosea declares that unless they repent of these sins, God will allow their nation to be destroyed, and the people will be taken into captivity by Assyria (Ho 9.3; 11.5), the greatest nation of the time.
God was not saying these things. Man made these laws and punishments because of their loyalty to God. it is the same in Ezekiel and Deuteronomy.
They were laws made and carried out by those who ruled over Israel. Israel had made a covenant then broke it. Moses was very firm in his laws because he was close to God. Moses also displayed temper.
They are not saying for the people to kill others (Thou shalt not kill) It is not God actually saying this It is the courts, the law makers same as it is today.