Refugees are always a byproduct of war. That is because people get displaced by the fighting. If you were a sinister general and wanted to really "hurt" your enemy, you would create a massive displacemnent of the civilian population in your enemy's territory. The soldiers in the enemy's army will more than likley be affected by this displacement of their loved ones which will have a demoralizing affect on them.
Plus as refugees are created, food production and other things stop being produced. So the commercial aspects of life virtually stops as there is no one to do this work. When you fight a war in your enemy's territory, you have a special advantage and it is very much related to the things I mentioned above.
Often times, like in the Syrian conflict in the 2010-2017 era, outside people came to Syria to be treated as refugees. Plus the US Govt. and its partners, encouraged the creation of refugees. They then used these refugees to flood Europe and to also send to the USA. This accomplished multiple things:
It removed the people from the fighting area which demoralized the enemy's soldiers
It destroyed the infrastructure, both physical and manpower
It placed a burden on a 3rd party (Europe and the USA) that the attacking army wanted to affect. This added a distraction to the equation
It helped to create chaos all the way around
The following videos contain a wealth of information that the