Who says it's not our problem? Above that, it's humanities problem.
The issue tends to be the best way of helping those most in need as a consequence.
The most in need tend to be the poor, women and children, as they don't have the resources to travel across the world.
That means that the young military age males that can afford the smugglers fees and are clogging up the borders, are actually taking resources away from the vulnerable, and limiting the availability of people capable of actually defending the disadvantaged.
Surely it's better to assist people to avoid the risks associated with travelling long distances and being abused along the route by smugglers and other crooks, and to provide care and resources as close to their homeland as possible.
They cease to be in danger a long time before they reach EU, never mind our borders, they should then cease to qualify for asylum and are then subject to the same migrant rules as everyone else on the planet, except they're circumventing that.