Agree completely. This is one of the worst things you can do, even if the code isn't particularly confidential. It is such an easy case to win. Worse yet, you expose your new employer to enormous liability and can taint their entire code base if left undiscovered for a long time. If I saw tons of source code of unknown provenance committed by some new guy, I'd be scared shitless.
If you're lucky, it might only cost you millions of dollars:
If you're lucky, it might only cost you millions of dollars:
https://www.houstonchronicle.com/business/article/Decadelong...
Or you could end up in jail:
https://en.wikipedia.org/wiki/Sergey_Aleynikov
https://en.wikipedia.org/wiki/United_States_v._Agrawal