Well F** that shit. Companies might treat you like shit, but I'd never judge a coworker for making the best decisions for their own life. That said, I've also never been surprised when a coworker puts in notice - pretty sure they typically tell everyone but management.
People, especially white collar employees, don't like to think of it as Employer V Employee but it is. Companies will lay you off without warning when it isn't profitable. You still don't get to say bye or off-board to other coworkers. I won't hold it against my coworkers for doing what they have to. It's just a job, and at 5pm it disappears until morning. A coworker quitting shouldn't impact you so much that you think less of them.
It's gotten increasingly common to see rescinded offers lately. If companies aren't punished for that behavior, then the rare outcomes become common. I've never seen a 2-week notice period on an actual employment contract for either party.