Re: How did they manage to get the entire OS
How does your iPhone manage to get software updates? The iOS firmware is available for download in apple.com.
If you meant "how did they manage to get the source code", the answer is they didn't, they don't need it.