God had them killed because they had tried to destroy his people.
Putting to death all the males was to put an end to their race
The male children who were killed who had not reached the age to be held accountable for sin though dying in the flesh would go to Heaven
This is not correct. You folks need to read all of Numbers. They did not try to destroy the Hebrew. In fact the Hebrew were living among them - and the Hebrew people started to worship their Gods and have sex with their women.
The Hebrew then committed genocide, - killing their own people for this. Then they are told to kill the Midianites.
The Hebrew tribes were marching across the land (supposedly,) and Balak was afraid he didn't have enough warriors to fight them off. He asks Balaam to curse them. Balaam does not do this however, and then we find the people settled together.
Num 22:10 And Balaam said unto God, Balak the son of Zippor, king of Moab, hath sent unto me,
saying,
Num 22:11 Behold,
there is a people come out of Egypt, which covereth the face of the earth: come now, curse me them; peradventure I shall be able to overcome them, and drive them out.
Num 24:1 And when Balaam
saw that it pleased the LORD to bless Israel, he went not, as at other times, to seek for enchantments, but he set his face toward the wilderness.
Num 25:1 And Israel abode in ****tim, and the people began to commit whoredom with the daughters of Moab.
Num 25:2 And they called the people unto the sacrifices of their gods: and the people did eat, and bowed down to their gods.
Num 25:3 And Israel joined himself unto Baalpeor: and the anger of the LORD was kindled against Israel.
Num 25:4 And the LORD said unto Moses, Take all the heads of the people, and hang them up before the LORD against the sun, that the fierce anger of the LORD may be turned away from
Israel.
Num 25:5 And Moses said unto the judges of Israel, Slay ye every one his men that were joined unto Baalpeor.
Num 25:6 And, behold, one of the children of Israel came and brought unto his brethren a
Midianitish woman in the sight of Moses, and in the sight of all the congregation of the children of Israel, who
were weeping
before the door of the tabernacle of the congregation.
Num 25:7 And when Phinehas, the son of Eleazar, the son of Aaron the priest, saw
it, he rose up from among the congregation, and took a javelin in his hand;
Num 25:8 And he went after the man of Israel into the tent, and thrust both of them through, the man of Israel, and the woman through her belly. So the plague was stayed from the children of Israel.
Num 25:9 And those that died in the plague were twenty and four thousand.
Num 25:18 For they vex you with their wiles, wherewith they have beguiled you in the matter of Peor, and in the matter of Cozbi, the daughter of a prince of Midian, their sister, which was slain in the day of the plague for Peor's sake.
Num 31:1 And the LORD spake unto Moses, saying,
Num 31:2 Avenge the children of Israel of the Midianites: afterward shalt thou be gathered unto thy people.
Num 31:7 And they warred against the Midianites, as the LORD commanded Moses; and they slew all the males.
Num 31:8 And they slew the kings of Midian, beside the rest of them that were slain;
namely, Evi, and Rekem, and Zur, and Hur, and Reba, five kings of Midian:
Balaam also the son of Beor
they slew with the sword.
*
As any sane person can see - the Hebrew had no reason, or right, to kill these people and kidnap and rape their little girls.
When you march an army into another people's land, settle, and then
YOUR people start going native, worshiping their Gods and sleeping with their women, - that is
YOUR problem, - and not that of the people whose land you are occupying!
ALSO - killing all the males, then having sex with the females, would produce half-breeds, not an end to a race.
*