Wait. I'm not sure I'm understanding this. It happened because someone visited your friends island on the day the villager moved in or your friend visited someone who had someone in boxes?
I only ask because I had Roscoe as a random move in. I didn't invite from a mystery island, campsite, amiibo, or another persons island and on the day he was suppose to be in move in boxes I got the sign that said "I've moved out." I think its been like that for a week now.
Since no one has answered you yet, it's kind of complicated, so... I'm going to take it from the top and hopefully this clears things up for everyone who's confused.
First, here's a link to a document about the "Moved Out" glitch.
Villager trading/exchanging is built into the game. If a visitor directly adopts a villager from a host's island, that villager will move into the visitor's island. After the villager is adopted, their house on the host's island will say "I've moved out," and be unable to be entered. This is normal, and this is what that Nintendo customer service representative was thinking about. Villagers that don't get directly adopted go into what people call "the void." Villagers from a void then have the chance to end up moving to another person's island with any kind of online communication. If I had an empty plot, visited someone else who had a voided villager, I could come back with that plot filled. You know you have a voided villager if you talk to them and they mention something about moving from a different island, yet you never invited them personally. This is also normal.
The original villager glitch was caused by adopting a villager that was forced out with the Amiibo (the campsite in general? I can't remember). Either way, that was fixed. Some people are still mistaking that old glitch for this new one/think that forcing villagers out will always cause this glitch. This glitch's key attribute was displaying the "This plot is reserved for 's new home" message on the adopter's plot.
But now there's a new glitch, where, after adopting a villager,
their home on the adopter's island will also say, "I've moved out." Not just the original host's island. The villagers will have weird interactions like not being able to be found but showing up during certain events, etc. That's where some people are getting confused. The "moved out" message is normal for the host's island, not normal for the adopter's island.
The problem is that, like you've seen, any kind of adopted villager can cause the glitch, and, seemingly, and kind of online interaction can pass a glitched villager onto you because it might specifically involve the "void" mechanic. Did you either visit or host anyone else? If so, your Roscoe came from someone else's void.