There are many reasons behind marriage; spiritual calmness and tranquility, fulfillment of reproductive needs and desires, having a partner in life and the continuation of generations. Giving shelter and asylum to women without an abode, protecting society from corruption, and the conditions of the time of the imams all contributed to polygamy being a normal thing.
In Islam’s viewpoint, the goals of marriage are as follows:
1- Spiritual peace and calmness: Verse 21 of Surah Rum considers this issue as one of the reasons of marriage.
2- The fulfillment of reproductive and sexual needs and desires; meaning that when one reaches puberty, his/her sexual instinct grows and needs to be controlled; marriage is the best way to control this need.
3- The continuation of generations and their expansion, meaning that in most cases, couples are granted children and as a result, future generations are born.
The importance of marriage in Islam  :
Although marriage isn’t wajib in Islam, yet it has been seriously emphasized on and many different hadiths can be found from the Prophet (pbuh) and the Ahlul-Bayt on its importance.
Imam Baqir (as) quotes the Prophet (pbuh) saying: “In Islam there is nothing more important than marriage.”  In another hadith, Imam Ali (as) says: “Get married, for marriage is (one of) the Prophet’s (pbuh) traditions. Whosoever desires to be one of his followers must follow his traditions.” 
In Islam, marriage is of much importance, to the extent that in some hadiths it has been stated that marriage is equal to the accomplishment of half of one’s religion (meaning that one who gets married has at least half of his religion).  In other hadiths, it has been mentioned that the prayer of the married individual is higher than that of a single individual. 
The imams and marriage:
The goals of the imams in getting married are nothing more than the Islamic ones listed above. Of course, these goals are also reachable if they had only one wife instead of multiple ones. So what can their reason behind multiple wives be?
In order to answer this question, one must pay attention to: 1- What is wrong with having more than one spouse? 2- Was such a matter considered bad in society back then? Or was it something normal because of certain reasons such as the fact that the number of women back then was much more than that of men?
3- Other than these matters, were there any other reasons for such an issue?
There is nothing wrong with polygamy, and no religious person scolds another just because of him having more than one spouse.
Of course, Islam has specific rules and guidelines for those who have more than one wife, in which the most important of them is to be nice and just with all of them. The Holy Quran says: “But if you fear that you may not treat them fairly, then (marry only) one.” 
As you can see, the Quran says to marry only one even if you fear that you can't be just, let alone be certain.
Moreover, polygamy was a normal and accepted issue in the era of the imams; many men could be found back then that had more than one spouse, especially those who were of a better financial status than others and capable of completely covering the expenditures of all of their spouses.
In addition to the fact that they (the imams) wanted the Muslim generation to grow, particularly the progeny of the Prophet (pbuh) and Lady Fatimah (as), while training them to be pure and righteous and of a great affect in the world of Islam. The frequency of believing and faithful individuals is something that Islam has called upon. The Prophet of Islam (pbuh) says: “Why shouldn’t the believer get married in order to have children who will spread the word of «لا اله الاّ الله» throughout the world. 
As a result of the dangers of their jobs and work, men are more likely to pass away than women. This results in the number of men who have lost their wives to be much less than the number of women who have lost their husbands. Young men usually don’t propose to widows, while many of these widows are young and don’t have a legitimate way of making a living that is of dignity and respect. On the other hand, we know that one of the main causes of corruption in society are needy women who don’t have a guardian or abode. If religious, well-off men get married to these women, thus accepting their guardianship, not only have they not done something wrong, but they have done society a big favor.
What is strange is that today, some who claim to be after women’s rights try to pass laws that ban polygamy  and although this might be a type of support for the first wife, it is an injustice to widows who can't get married because of these laws or because of such marriages being considered indecent and ugly in society.
Allah (swt) says in the Holy Quran: “And when the woman is divorced and has fulfilled her prescribed period (of waiting), do not prevent her from marrying her husband when they agree among themselves in fairness…”. According to one of the two tafsirs for this verse, it is telling us not to prevent a woman from getting married to other men after she has gotten divorced. That is because in the past and today, stubborn individuals who have divorced their wives, are sensitive towards them getting married again, while such a thing is nothing more than a form of ignorance. 
For further information, see the following indexes:
2- Islam and polygamy, Question 633.
 With help from Question 2478 (website: 2619).
 Muhammad ibn Hasan Ameli, Wasa’elul-Shia, vol. 20, pg. 13, Aalul-Bayt Press.
 Ibid, pg. 15.
 Ibid, pg. 17. The Holy Prophet (pbuh) says: “Whosoever gets married has obtained (and protected) half of his religion.”.
 Wasa’elul-Shia, vol. 20, pg. 20, (و فی الخصال قال قال ع رکعتان یصلیهما المتزوج أفضل من سبعین رکعة یصلیها غیر متزوج.) (It has been narrated in Khisal that his Excellency said: “Two rak’ats that a married individual prays, is better than seventy rak’ats that a single individual prays.”)
 Wasaelul-Shia, pg. 14.
 Unfortunately, in some cases they are also successful.
 Naser Makarem Shirazi, Tafsir Nemouneh, vol. 2, pg. 183, Darul-Kutubul-Islamiyyah Press, Tehran, 1374 (solar), first printing.