They seem to have not adopted appropriate procedures for exiting an employee. Nor did they have appropriate advice on handling IP issues. This is evidenced by the article's conflation of copyright (the literal code) function (what the code does) and tradesecrets. Whether the code enables the same features is not the issue. It is very possible that he stole and used code in an altogether different product. It is also possible that he stole said code and didn't use in any other product. That can still be a copyright/tradesecret violation.
Having legal advice at hand can prevent these situations in the first place. It doesn't cost much to have a lawyer drop by for an afternoon each month. I do quick IP lectures all the time at small outfits. Making sure new employees and current managers understand what IP actual means can really calm the waters.