Moses negotiating the Exodus from Egypt with Pharaoh leading up to the Ten plagues: First Pharaoh enslaves the Children of Israel: "[The Egyptians] appointed conscription officers over [the Israelites] to crush their spirits with hard labor. [The Israelites] were to build up the cities of Pithom and Ra'amses as supply centers for Pharaoh...The Egyptians started to make the Israelites do labor designated to break their bodies. They made the lives of [the Israelites] miserable with harsh labor involving mortar and bricks, as well as all kinds of work in the field. All the work they made them do was intended to break them." (Exodus 1:11-14
, then he issues decrees to kill all the Israelite males (Exodus 1:15-16) (Moses is saved by his mother putting him into an ark of bulrushes), and after first being the option of freely letting the Israelite slaves go, God hardens Pharaoh's heart, so that Pharaoh does not agree to let the Hebrews leave, then God sends various disasters onto the whole of Egypt, the cycle ends with the story of the killing of every firstborn child in Egypt as the final punishment for having afflicted the Israelites with deathly punishments. (Exodus 6-14)
The people of Midian together with Moab began to interact with the people of Israel, including sexual relationships: "Israel was staying in Shittim when the people began to behave immorally with the Moabite girls. [The girls] invited the people to their religious sacrifices, and the people ate, and worshiped the [Moabite] gods." Numbers 25:1-2
For these transgressions, the Midianites were attacked by Moses and his followers (Num 31:1-54). When Moses learns that some Midianites have been spared (Num 31:15), he orders all males and non-virgin females killed, and all the virgin females to be taken captive (Num 31:17,18). The virgins were divided among the priests and the people. (Num 31:32-35). The text does not specifically describe their treatment afterwards.
From a contemporary standpoint, some of the punishments and laws described in the Bible are viewed as being morally questionable, or even abhorrent. Some typical points of criticism of the Bible's legal code include:
The Bible tacitly endorses certain forms of slavery; it records many laws and procedures dealing with slaves.
The Bible's strictures on homosexual sex are seen as outmoded by some groups. As well, the Bible's endorsement of capital punishment and its restriction on adultery are often viewed in a similar light. On the other hand, more conservative critics are more critical of the Bible's permissivity toward polygamy.
Even among proponents of capital punishment, many of the crimes which the Bible records as punishable by death are not currently regarded as deserving of this penalty. Examples include idol worship, as well as the crimes of striking or cursing one's parents.
Additionally, many of the military punishments recorded in the Bible would today be considered to be war crimes, or, at the very least, unwarranted and excessive. These events are sometimes labeled "atrocities" by critics of Christianity (fundamentalist Christianity in particular), and presented as examples of ridiculousness, inconsistency and hypocrisy in those who subscribe to a literal interpretation of the Bible. One website summarizes the argument: "Myth: The Bible is morally pure and free from atrocity. Fact: The Bible is filled with countless acts of barbarism and tyranny."
The argument dates back at least as far as 1795, voiced by Thomas Paine in The Age Of Reason.