The large numbers of people trying to migrate on flimsy boats from Africa to Europe are not all poor and desperate. The cost of arranging these trips is beyond the means of most. Many of the people on these boats would be entrepreneurs in their own countries if there were even a slight prospect of a better life there. So why isn't there? Why do they leave their culture, their families, their support network and pay large sums to criminals to arrange a very chancy, unpleasant trip to countries that certainly don't want them (to put it mildly).
Not the whole explanation, but a large part of it, are the corrupt, insane European Union trade policies including especially the Common Agricultural Policy which, by subsidising farm production in Europe and imposing formidable barriers to imports has made it very difficult for the food-rich African countries to step onto the first rung of the economic development ladder. Europe adopted the same policies with respect to tropical products and textiles, all at the behest of their own powerful farm lobbies and corporations.
So what did they expect? By creating 'fortress Europe' the Eurocrats exported poverty and instability to poor countries. At the same time they give a few million dollars of funds collected from taxpayers in 'aid' and expect these countries to be grateful. And they act concerned when, after decades of kicking these countries off the development ladder, they are besieged by Africans looking for a better life. It would be unhelpful, childish and arrogant to say 'I told you so', so I won't say it even if it's true – which it is.