- You had installed sync before but uninstalled it.
- You started syncing again on the same location as previously.
- There was some leftover sync state after the uninstall that was not interpreted correctly by the new version of sync, or had been corrupt.
As a result, it was determined that your local files are up to date and cloud files out of sync, which triggered the mass deletion.
Bi-directional sync can be nasty...
1. Very early days of Google Photos I deleted a few photos hoping to free up some space. Not realising that gphoto deleted every copy everywhere.
2. Deleting passwords from Chrome before passing the machine on to another family member. It deleted every password everywhere.
Lesson: sign out from Google before doing this sort of thing. And possibly uninstall the relevant software.
[edit I have misread; did you or google move them to the trash?]
Earlier sync tools like rsync can do the same, but only if you pass an option telling it you really want to delete files
https://www.theverge.com/2023/12/6/23991183/google-drive-los...
Now I use Syncthing. It's far more reliable.