It's a bit more nuanced, although I get your point.

So the way I see it is that you can hardly close your borders, it's a myth. Countries are gigantic, if you want to migrate bad enough, you migrate. Building giant walls isn't effective or even realistic. You can make it harder and reduce the flow, but people will come. And if you close borders, that means you need to act accordingly. i.e., if someone does get through, you can't accommodate him, after all that would imply the rules are only valid for those who don't break them, but once you do break the rules and get in illegally, you can stay. That makes no sense, so now you've got closed borders, people still get in, but they can't start a life. Can't get a home, a job, can't become self-sufficient. Now you've got a problem of a large group of dependents, who face homelessness and desperation which leads to other issues, too (e.g. crime). And because they have an ethnic profile, that'll lead to a backlash of racism. Migration studies have shown time and time again, those whose place in society is facilitated tend to do well and become a part of society relatively quickly and become 'decent tax paying folk' with positive socioeconomic mobility outlooks, whereas making normal life difficult left and right for new migrants leads to the opposite, a new group of dependents that everyone hates on.

So closing the borders makes little sense. Further, tons of countries, particularly a number of Western European ones, are bound by various treaties and laws they entered in to themselves. Take WW1, more than 1 million Belgian refugees fled north to the Netherlands which was unaffected at the time, a country of just 6 million people back then. Can you imagine one in 7 in your country is a recent refugee from just one particular country? Not just that, but most of them came to the south. There were villages of just 15 thousand people which saw 100 thousand Belgians arrive, completely changing into essentially Belgian cities. Experiences like that and many other with refugees, shaped all kinds of laws, policies and treaties, which can't just simply be broken. So you need an alternative.

But then open borders is tricky, too. For one because there need to be two things. 1) some form of a check on whether the person is a refugee or not, and 2) some, quite small, level of friction, so as to discourage new migrants from coming unless it's absolutely necessary, and 3) some level of friction to slow down the influx and spread it out over a longer time period, so as to be able to properly accommodate everyone. That means decent housing, social programmes, employment or at least a level of occupation (whether it's voluntary work or education) to keep people busy, etc. Complete open borders means you'll get a bunch of non-refugee migrants coming along, and a large influx into a small number of popular cities that aren't adequately prepared.

So I understand the schizophrenic dance in between, with sorta-open borders. What I don't get is that the overal policy just feels hugely ineffective, that everything is moving much slower than need be, and that alarm bells are going off left and right with a society that's going crazy over a problem that's relatively minute in the history of European crises. Europe has the resources to handle this, but somehow it's failing.