The people "commit whoredom with the daughters of Moab." 25:1
Under God's direction, Moses' army defeats the Midianites. They kill all the adult males, but take the women and
children captive. When Moses learns that they left some live, he angrily says: "Have you saved all the women alive? Kill
every male among the little ones, and kill every woman that hath known man by lying with him. But all the women children,
that have not known a man by lying with him, keep alive for yourselves." So they went back and did as Moses (and
presumably God) instructed, killing everyone except for the virgins. In this way they got 32,000 virgins -- Wow!
(Even God gets some of the booty -- including the virgins.) 31:1-54