why is polygamy allowed in Islam?

Polygamy is a practice that has been allowed in Islam under specific circumstances. The Quran, the primary source of Islamic law, permits a man to marry up to four wives, on the condition that he provides for them all fairly, equally, and honorably. Polygamy is regarded in Islam as a solution to certain social problems such as caring for widows and orphans or providing companionship for women who may not have suitable marriage options available to them. 

The decision to enter into a polygamous marriage must be made with mutual consent and consideration. Additionally, Islamic teachings emphasize equal treatment of all wives without showing any special preference towards any one wife. It should be noted that while polygamy is allowed in Islam it should not be practiced selfishly or irresponsibly.