Also if it was your own code, stealing it to "kickstart" your position at your new employer also feels like a rather bad deal: just bringing your knowledge and spend a good part of your time recreating something you already know how to do sounds like low effort for big money, a much better deal for you if your aim was to get better comp and job security.
The one thing that might skew this equation, and can only be theorized about with the knowledge we have here would be if your new employer DID collude with you and proposed tremendous returns for giving them access - eg a kind of off-the-record deal where you'll engage in corporate espionage & theft of ip for big cash following through some hidden compensation construct.
Assuming the latter would border on conspiracy theories and i don't want to suggest this would have been the case here. Just a play of thoughts to add to the reasoning that YOU doing it on your own for ill-guided hypothetical benefits might not be the sole factor leading to such theft at all.