Excuse my ignorance, I have two questions:

1) How legal is this (assuming I have a a valid macOS licence that comes with my Apple hardware/laptop)?

2) Can this be used to do iOS development?

All the necessary files come from Apple's CDN (Updates), https://github.com/popey/sosumi-snap/blob/master/snap/local/...

Check if there are any restrictions in your EULA when you access Software updates from your Apple computer.

It is the magic string in the hit repo that is not allowed

It kind of is, though.

https://github.com/kholia/OSX-KVM