They were locked out because they lost their key.
Unlawful lock-outs or evictions are often timed to coincide with brief absences, and may ripen while an alien is out of the country visiting relatives.