Can someone explain what the motivation is behind running Darwin?

Continuous integration servers that aren't run on genuine Apple hardware?

Wouldn't you have to reverse-engineer and implement a LOT of closed-source APIs and libraries to get a full iOS toolchain going?

There is a project [1][2] to emulate iOS in QEMU. You can find more details about installation process and research itself in their articles [3][4].

[1] https://github.com/alephsecurity/xnu-qemu-arm64

[2] https://github.com/alephsecurity/xnu-qemu-arm64-tools

[3] https://alephsecurity.com/2019/06/17/xnu-qemu-arm64-1/

[4] https://alephsecurity.com/2019/06/25/xnu-qemu-arm64-2/