If there were proper channels to apply for asylum in safe countries, there would be less need to risk everything to get to a safe country. Once in a safe country you can either stay or get temporary stay visa while you apply for a visa in a 3rd country. Sadly this system seems to have been eroded, people traffikers now fill the voice once held by consulates etc. (or how ever people used to apply to go to other countries)