I set my profile image on my phone, and it updated automatically when I got my new Mac, so I know it's in the cloud. Yet for other people it still seems to show the old image.
When same Apple ID and password say example1@icloud.com is signed in between iPhone and Mac on the same network , if you update the profile pic on iCloud.com or Mac it is mirrored in iPhone .
The other people have different mail address with different account credentials and they can't use your Apple ID account credentials , however in contacts / messages when you edit them the pic is saved in it and other people chat with you view your contact image and not profile image .
The function of profile image and contact image are quite different things .
When your wife reset the iPhone all settings are erased , the iCloud account is set and she is using same Apple ID and password of yours the contacts were previously synced with iCloud and saved and the same contact image will appear .
As you mentioned - it updated to my old iCloud image .
Once again the same Apple ID and password is used in iPhone so profile image of Mac will be same as in iPhone .