How was my privacy compromised during my phone upgrade?

A family member offered to exchange my phone with the mobile phone store for me. I deleted (but did not reset) the messages from my phone. I gave the family member my Apple ID and password (I have since changed these). I received my new phone from them and two days later, it was clear to me that they had read messages on my phone not intended for them. They also made it clear that this had happened two days later, when they no longer had my phone. How did this happen? Did they backup my phone to their iTunes account and gain access to my information and then snoop? Is that even possible? I do not think they installed a spying app on my phone. I understand they could retrieve old messages if they had my phone physically, but they do not. And how is it possible that they did not "stumble" upon this information this until two days after they had given me my phone? They refuse to offer further information. I feel violated and would like to get to the bottom of this.
Were these past messages or were these current messages you were receiving? If your old phone is still signed in with your Apple ID then the phone is still receiving your iMessages. Once messages have been deleted there isn't a way to restore them unless they used your Apple ID information and restored a previous iCloud backup. Those are the only things I can think of in this situation that would explain what you're detailed.

Original thread: https://forums.imore.com/threads/how-was-my-privacy-compromised-during-my-phone-upgrade.379246/