Licensing aside, it's just a computer OS at the end of the day. If you can get the right hardware virtualized there should be no issues. There are premade images that make it really easy to run macOS in a VM without having to go in and change a bunch of configs
Interesting, but it leaves the question how do you trust these images if they are not official?
There's a script linked in the post that downloads the installer directly from apple.com. Of course then you have to go through the install process yourself.
Do you know if the software "phones home", or requires an Apple ID?
Can you use this as a development environment, or would you need an Apple ID?
It does not require an Apple ID , it is impossible to use one without some further configuration. [1]
You can’t use the App Store without an Apple ID, so you are unable to download Xcode I think.
macOS is closed source, so we don’t really know hoe much it phones home.