I can only speculate on what happened.
When you plug a Sony reader (actually, any reader) into a computer, the reader software switched into 'disk drive' mode. In other words, it stops being a reader and becomes a disk. Both sets of software are complex, and the interactions probably equally complex. I can easily imagine corner cases (reader bugs) where this switch-over isn't clean, with the result that the reader gets confused. The fact that you had to reboot the reader argues for something like this.
Now, collections. On a sony, collections are stored in main memory, even if the books are on an SD card. If main memory got hosed in some way, then when you rebooted the reader it would throw away its database and rebuild it from books. Result: metadata would revert to what is in the books, and collections will be lost. If you have any .txt files on the reader, check their metadata. A database rebuild will set their author to "Unknown" and their title to something inferred from the file name.
Unplugging and reinserting the SD card will force the reader to take a close look at the card and to check the card's embedded database. It is possible that for a time, the card was read-only, which calibre would not like and might possibly prevent calibre from seeing the card. It is also possible that the card's database was broken in a way that calibre didn't like but the Sony Reader sw could tolerate.
Of course, I could be completely wrong, and instead a garden gnome put binary beetles into your reader.
One thing I am quite sure of is that you didn't do it. I think it was bad luck. That is what backups are for.
If you can get to the point where you use calibre's automatic metadata management, then incidents like this will have little effect. Calibre will be able to rebuild all the metadata when you connect the device.