Why shouldn't two AC sources be connected in parallel?
Note: I am not trained in electrical safety. Do not rely on this post for safety advice. I know you are asking theoretically, but I feel like I should put this disclaimer here anyway.

Is it because the waves may not be synchronized and could then cancel out each other? Or something else?

That is the main reason, but the consequences are worse than just having the voltage cancel out.
Let's imagine the worst case where the sources are perfectly unsynchronized (180 degrees apart - opposite voltages all the time) and that the voltage is at the maximum when you make the connection. Remember that AC is just time-varying DC - at the instant when you connect them together, you have this circuit:



simulate this circuit &ndash; Schematic created using CircuitLab
You've connected two voltage sources in a loop. Forget the load - what happens to the voltage sources? Well, V1 tries really really hard to make the voltage 240V, and V2 tries really really hard to make the voltage negative 240V. V1 makes lots of current flow from the bottom to the top, and V2 makes lots of current flow from the top to the bottom again. This is basically a short circuit, but short circuiting two sources at the same time.
If V1 and V2 are alkaline batteries, they might get quite warm. If they're NiCad batteries, they might get hot enough to melt plastic. If they're lithium rechargeable batteries, they will definitely burn up.
If V1 and V2 are inverters (as in double-conversion UPSes) the output circuit will probably blow up (literally).
If V1 and V2 are different phases of mains power, you'll get a big spark and pop the circuit breaker. If enough power is available, the spark (known as an arc flash) can be big enough to cause serious injuries. The main power feed to the datacenter probably can do that. I don't think you're likely to be seriously injured by plugging an IEC connector into a short circuit (even on two different voltage sources), but I still wouldn't try it.
If V1 and V2 are standby UPSes, running on the same phase of mains power, they should both be in phase - until one of them switches to battery power, at which time it will blow up because its inverter is now in parallel with the mains power.