Oh, it is so easy to do
A few months ago I discovered that a "quick and dirty temporary change" that I made to a program to debug something was still there two years later. Fortunately I am the only one to use the program so no harm done - but it could have been if it were released.
What I realised is that all quick-and-dirty hacks should be documented somewhere and that somewhere reviewed weekly. But doing so is incredibly hard -- "it is only going to be there for 5 minutes, honest guv!"
Me working by myself on pet projects is one thing but corporate environments need code reviews before things go live. Management do not like that as it slows things down and costs senior programmer time.