probably didn't. They probably copy/pasted large chunks of assembly in the process of reverse engineering it. The large chunks would probably be what's being referred to as Apple's code.
What took them so long?
Wait, they're OK jailbreaking, but they won't release it because it contains Apple's code?
That's exactly right. Jailbreaking is perfectly legal as it change's one's own device, but distributing intellectual property (in this case the Apple code) without the creator's permission is not.