This 100% does happen, all the time, mostly in SMB.
Hire a team to build a project, when it's finally satisfied most of your requirements, you progressively cut staff until only Jim is left, and Jim spends the next two decades maintaining the system, growing out his hair and beard, piling kludge on top of kludge, and drinking heavily until retirement.
The HN bubble, focused so intently on BigTech and FAANG, is woefully unaware of how things work basically everywhere else.
That does happen. Obviously no programmers employed at those companies to talk about it on HN though.