Some emulators solve this by providing their own (re)implementation, but that’s not always easy.
And even when it’s “just” iOS: That is copyrighted too! So it’s the same problem – either there needs to be an iOS ABI-compatible OS, or it’s probably not possible to emulate any application legally, unfortunately.