Sure a lot of people coast in the private sector, hiding in the corners of their organizations. But if the business allows too much of that to happen, they go bust. In government, they just go get a tax increase.
You seem to think that people cannot escape the consequences of their actions, and that consequences arrive swiftly and fairly. But I should think a quick look around the world we actually live in will disabuse you of that notion in short order. Especially when it comes to gigantic centres of power with vast reserves of cash and well protected revenue streams.
And if you've worked in any tech company, you've probably already seen that the people who coast do not "hide in corners" they make up an entire class, called "management", especially "middle management", they're front and centre because they have no productive work to do so they can devote the majority of their time to extravagant displays justifying their existence and their elevated positions and compensation.
But eventually the work got done and we kept getting work because Big Companies buy from other Big Companies. You're not going to risk tendering to a 3 man office who gets it done faster, cheaper, better because if it doesn't happen questions will be asked. Unfortunately there are a lot of talented small businesses out there but they just don't get the work due to this.
I've known people in every corporation I've worked for who accomplished nothing and were not managers. I was often given the job of trying to turn whatever they did into something useful. Everybody knew who they were. I remember one person, we'll call "Smith". "Smith" would check in code, and it was always so bad that someone else would have to redo the whole thing. After a while, the term "smith-code" became a generic term for code that was worse than nothing.
How bad can you be that your name becomes a generic term for useless work?
"Smith" eventually got laid off. The team was relieved.
I've known a few Smith's in my time, one thing they all had in common was the protection of a manager who had no interest in the quality of Smith's work, as long as Smith would take his side in any disputes. When the consequences became too great, the manager would suddenly understand the problem and approve the minimum of changes to fix it, while taking credit for the work. Smith would not complain about this slight because he understood the nature of the transaction.
Edit: btw. congrats getting rid of your Smith, these people can be very difficult to dislodge. Presumably your guy did not have the protection of a manager.
Their scopes are still for sale and still good.