I'm impressed that so many people know ahead of time they are getting laid off. When I was laid off, and my friends were laid off, it was either a meeting with my manager and HR sneaking in at the last second, or a meeting with the CEO and HR, etc. Blindsighted, credentials inactive right away, can't say goodbye to your coworkers.
But for many people they can feel it coming. Projects are slowing down, money's harder to find, initiatives are canceled, executives are moved around, the calendar is clear in to the future, no projects are being added to the ticketing system. There's lots of little indicators to tell you what people are planning
After all these little signs that add up, giving you a bit of a red flag, then suddenly there is a meeting thrown on your calendar the next morning at 8:00 a.m. after you left for work the previous day. You put two and two together and you've got a strong confidence something's going to happen
Mine was completely out of the blue, but I also wasn't surprised as it was happening. I finished a project I wrote myself to replace an old system their other developers didn't want to work on. They rewarded me by keeping me on for a couple months of post-launch support and then rewarded me by laying me off as a thanks, providing the bare minimum required payments as required by law and tried to get me to sign my rights away, and they refused. They likely replaced me with someone cheaper, which is impressive considering I was already underpaid for my level. I ended up getting a job paying 30% higher (which is actually what happened with that job prior too lol, there is a bit of a pattern tbh that started from my first dev job making barely above min wage), but I honestly think I was still a little bit surprised when I proved I knew the old and new tech. They said they would provide a reference but when I asked my manager for a letter of recommendation, I never heard back from him. What a dickhead lmao
Realistically, that manager replaced me and some other developers with his friends, it was a cheap company rampant with nepotism especially on certain teams, but it was still a company with hundreds of employees so it was a bit surprising to see that.