The creation accounts in Genesis present monogamy as the ideal, none of the prophets had more than one wife and often spoke disparagingly about polygamy comparing it to polytheism and idolatry, only one of the many rabbis mentioned in the Talmud had more than one wife (and he had only done so during a time of severe famine to save them), and a tradition also held that a wife had the right to divorce her husband if he took another wife. God is never portrayed as commanding anyone to take a second wife and in most cases in the Old Testament where polygamy is described it is disastrous (most notably Abraham and David). However, it did exist in the Old Testament and Mosaic law did permit it.
Why it was permitted is the subject of theological debate. Jewish tradition normally emphasizes that polygamy was never looked upon as a good thing but was permitted as a concession to the realities of the world they lived in. Maimonides in his Guide of the Perplexed (Book 3, Ch. 32) states: “Many precepts in our Law are the result of a similar course adopted by the same Supreme Being. It is, namely, impossible to go suddenly from one extreme to the other: it is therefore according to the nature of man impossible for him suddenly to discontinue everything to which he has been accustomed.” Maimonides argued that while the Torah allowed certain behaviors, it also established rules that diminished the acts, modified and controlled them, and gave insight to those who could read the text properly that the practices were wrong.
In Christian tradition we see this through the lens of God’s gradual revelation: “In times past, God spoke in partial and various ways to our ancestors through the prophets” (Hebrews 1:1) and Jesus appears to say that the Mosaic law did in fact make concessions to the weakness of human nature (Matthew 19:8). This would be in harmony with the traditional Jewish view that God permitted it but did not approve of it and gave every indication that it was wrong. With the fullness of revelation in Jesus Christ we see explicitly that polygamy is not the intention of God (Matthew 19:1-9).