Eritrea is literally a textbook dictatorship, the kind of you knew from 90s era videogames such as Jagged Alliance. It is not even legal to leave the country, anyone leaving and returned risks lifelong incarceration with torture applied, that is if they are not simply caught and put into torture camps outside Eritrea.
National service is compulsory which some may say would be okay and fleeing is desertion with the caveat that serving in Eritrea military is de facto not only compulsory but also indefinite and not limited to age and wages earned there are kept intentionally low so that they can't really make a living from that at any point of time while also getting very low provisions while living in disastrous conditions and working de facto around the clock. A classic slave army. Another issue is the fact that free speech which many people hold so dear here is practically non-existent, there is no press or internet, if you think NK has it bad then, yes, they do but Eritrea is close behind. It is humanely understandable why anyone would flee that.
Why the EU is taking these people is another question. A lot Eritreans do not even file asylum requests which would validate their refugee status eventually, I believe it is closely connected to being information-starved and once outside the country also being guided around by shady figures such as human traffickers, torture camp leaders and renegade militias. This puts a lot pressure on the EU as has the entire situation with African migrants which is why the EU
has made some deals which - if the contents ever got out - could tarnish its reputation since it's a deal based on quid pro quo: No more criticizing human rights issues and crimes against humanity in return for heightened domestic border control against those who want to escape the regimes and persecution, say not just in Eritrea but Sudan as well.
What should have been done instead is creating some sort of EU exclaves in some North-African regions where requests are processed before people get into dhingies and where some people from some states also receive a crash course in the legalities and formalities surrounding asylum requests, eventual transfer to and living inside the EU.