Rabbi said: At every place where Israel sat down in the wilderness, they made idols for themselves, as it is said, "And the people sat down to eat and to drink" (Ex. 32:6). What is written here? "And they rose up to play" (ibid.); they commenced to worship idols. One verse says, "And Israel abode in Shittim" (Num. 25:1). What is written here? "And the people began to commit whoredom with the daughters of Moab" (ibid.). They commenced to be immoral.
Rabbi Jehudah said: "The counsel of the wicked is far from me" (Job 21:16). This (text) refers to the counsel of Balaam, the wicked, who advised Midian, and there fell of Israel twenty-four thousand men. He said to them: You will not be able to prevail against this people, unless they have sinned before their Creator. They made for themselves booths outside the camp of Israel, and they sold all kinds of merchandise of the market. The young men of Israel went beyond the camp of Israel and they saw the daughters of Midian, who had painted their eyes like harlots, and they took wives of them, and went astray || after them, as it is said, "And the people began to commit whoredom with the daughters of Moab" (Num. 25:1).