It's important to understand that *all* changes gets synced. If you change something on ancestry, it will change it in FTM on the next sync. If you change something in FTM, it will change it on ancestry with the next sync. That is the way the software was intended to work.
And again, the branches weren't deleted, just disconnected - and could have been easily fixed without resorting to a backup.