That is very US-centric.
In many places (in the world) you are expected to for months after you are laid off. In many european contries, layoffs must be announced a long time before they happen (a maximum number but not specific jobs).
In any event, you are expected to be loyal to the employer.