During a new Mac setup, it asks for the iPhone passcode. Why?
I think that you've selected to use your iCloud account, so by verifying your Passcode with you iphone Apple added a security to be sure that you are the owner of your iCloud Account. This will allow your Mac to synchronise your data from iCloud.