Why does the doctor sync with the R waves for sync cardioversion?

Safety. An electrical shock at the wrong time during the cardiac cycle can unduce ventricular fibrillation, a potentially life threatening dysrhythmia. Syncing the timing of the electrical discharge helps prevent this from occurring.
Prevent . To prevent dangerous arrhythmia called ventricular fibrillation which can be induce if the the shock is not correctly synced with cardiac cycle r and t waves.