VCC2 of DS1302 is the main power supply with priority. When VCC2>(VCC1+0.2), VCC2 supplies power; when VCC1>VCC2, VCC1 supplies power.
Moreover, the VCC1 pin itself is bidirectional, which can power the chip or charge an external battery; VCC2 can only power the chip, not the battery.
If the two are reversed, the battery cannot be charged. When the voltages of the two are close, the battery energy will be consumed first, thus losing the role of the backup battery.