Does something like that always automatically lead to resident status?
The circumstances were that most of Poland had joined an independent trade union, which is awkward for a Communist country that is theoretically run by the working class. You can wikipedia 'martial law in poland' and get all the context.
https://en.wikipedia.org/wiki/Chinese_Student_Protection_Act...
In this case the automatic permanent resident status was created by a specific law; it wasn't a consequence of general legal principles.
The U.S. government does offer a relatively automatic asylum when people experience or fear certain kinds of persecution abroad, but the determination is supposed to be very individual and fact-intensive.
There was an exception to the detailed factual inquiry for Cubans: generally any Cuban who made it to the U.S. -- evading the U.S. Coast Guard, which was trying to prevent people from taking advantage of the policy -- would be given permanent resident status.
Came on a six-month tourist visa, got locked out of return trip due to an ill-timed declaration of martial law back home. Silver lining was automatically receiving US resident status.