Because you pointed 2 programs at the same directory to sync the content with an external directory structure.
In my experience adding an already existing directory structure to a sync program is a bad idea. Create the directory and then move the existing structure into it to be safe or/and at the very least have a backup.
Not having a backup is on you. You got lucky this time.
A compacted archive could be used as an attack vector.
Both of them are valid for any OS.