On an economic level alone, an increase in population possibly not willing to work is in no way beneficial to the resources and stability of that country. There is no way that the idea of western countries being built on cheap labor makes immigration more beneficial to the millions that have to be sustained from the countries resources. The results of opening borders have been deteramental, especially to countries like Sweden where what was once an unbelievably safe and stable country has seen an influx in crime and rape counts.
If the west can help migrants anywhere it's in their own countries, we must solve the problem, not the symptom. This will tie into no longer funding terrorism in the Middle East like the west has and rather investing in what armies and structures are left in the Middle East, of which are most certainly spiteful to be losing a battle while possible soldiers are immigrating to the west.
1. The west has a moral duty to take in refugees and immigrants:
(A) The west caused the situations that have led to the need to emigrate in many parts of the developing world; they have had repeated failed interventions (Iraq, Somalia, etc.) that have exacerbated the violence in the region.
(B) The west actively benefited from policies that destroyed the economies and societies of the developing world -- through colonialism and slave trade, the west unleashed plunder, pillage, oppression and violence on the developing world and in return grew wealthy and enriched itself economically.
(C) The west has the capability to offer refugees and immigrants a better quality of life as opposed to the threat on their lives caused by terrorism (Iraq, Syria and the Middle East), or by poverty and the lack of opportunities. Neglecting these people and prioritizing the west's privilege over the basic rights to life and dignity of these individuals is unfair.
2. Both the west and the vulnerable nations benefit from immigration:
(A) THE WEST:
The west has a receding population which is supplemented by not just in numbers but also in diversity by immigrants; people in the west are no longer willing to occupy themselves in blue collar labor, creating large demand for laborers which refugees and immigrants satisfy; immigrants contribute US$ 1.25 to every US$ 1 spent on them. To summarize, immigrants are productive, occupy sectors of the economy where there is an under-supply of workers and spend in these nations thereby contributing to economic growth. Even when immigrants are not in utter risk, they lack opportunities in their home states which they can obtain in the west, for eg: 26% of all British doctors are not British.
(B) VULNERABLE NATIONS:
By creating some initial investment and sacrificing some of it's biases in the beginning, the west not only gets economic benefit and social diversity (which too gradually becomes more cohesive), the west saves individuals from a life where they constantly live in the fear of losing their life to terrorism, airstrikes or chemical attacks from their own state, or a life where they're in abject poverty. Additionally, these people send back remittances to their home states and often emigrate back (80% of immigrants from Romania, go back to their home country after earning abroad) to their country with skill and capital.
Finally, it is untrue that refugees contribute to violence or are economic liabilities -- these are just Islamophobic and racist statements that research has repeatedly disproved.