...Isn't that illegal? Or did they do it with permission?
It wouldn't be illegal even if they didn't have permission. Intellectual property laws only apply if he filed for a patent, copyright, trademark, etc., and especially as he is not selling his code, it would be extremely difficult to do that.
Basically it's just a dick move, but technically allowed in the legal sense.