What I don't get about these lay-offs, is that these companies usually start hiring again soon after
This actually works out fairly well for everyone - some people get hired and stay because they're good, some get hired and then dropped but they earn well and get a big name on their resume for their time, and the company eventually builds a stronger team.
Otherwise people will always go into voodoo practices trying to avoid the inevitable failures.
Layoffs are not always about reducing the size of the workforce, but can also be to remove the low performers.
The only thing saving many high performers was better understanding of the company direction. Meaning a lot of the good folks figured out the “safe” teams/organizations and transitioned shortly before the lay off occurred.