Restoring Backup to new Iphone asks for another Apple ID Password
I am setting up a new iphone for my two kids. We chose the restore from icloud backup. On one of the phones, it asked for my Wife's apple id password due to some apps being bought by her id. It did not asked for that on the other phone. On the phone it did ask for her password we did have family sharing turned on (on the old phone) to include icloud storage sharing and app purchase sharing. On other phone we were not sharing icloud storage. I am not sure about app sharing.
Anyone know why it asked for my Wife's password and if it is an app, how do you find out which app?
On both of their iclould accounts and my Wife's both are listed under family sharing (added a couple years ago) and my wife is the organizer.