Illegal migration is wrong and is rightfully opposed by many countries. There are procedures everyone must follow. Nobody is above the law, especially not if you're entering a country.
Illegal migration is tautologically opposed by all countries; moral statements like “wrong” are almost (but not quite) tangential to what the law say — there are many evils throughout history which were not only lawful, but where the opposition to them was illegal.
If you are persecuted by a state of which you are a citizen and are refused a passport, or have your passport cancelled, typically your one and only option to travel to another country to apply for asylum status is to do so illegally.