When we abolished the internal borders within the EU, through the Schengen cooperation, the agreement was that the external borders would be managed by each individual member state. In practice this means that the border between Greece and Turkey is also the Swedish external border, but we have to trust that Greece is managing this border in a correct way.
During recent years, the debate on borders has been heavily framed in the context of the migration crisis but it is important to nuance the debate. The idea is that the border should be a sort of checkpoint towards the outside world, so that we have a possibility to control both goods and people that wish to cross the border into the EU.
Since there is an international obligation to examine the case of each person that applies for asylum (also at the border), no borders will stop these individuals from entering Europe, but it gives us a possibility to manage flows of people and to control these people in an organised way.
Border controls are also an important part in stopping illegal weapons, narcotics and other illegal goods that we do not wish to allow into the EU territory.
In recent years it has become increasingly obvious that many member states are not living up to their obligations to manage the external borders in an acceptable way. Therefore the EU has created, in the course of the current mandate, a new European Border and Coast Guards agency. This agency is in its initial phase and has total of 1000 employees and a special pool of 2500 national staff members that can be deployed if there are special needs.
The common border protection in the EU is, however, still insufficient and the Member States keep the main responsibility. For example, compare with Canada or the USA who have 14 000 and 62 000 staff members respectively employed in their border control agencies. I think that in the future we will need to form a common border protection for the EU.