Power = Volts * Amps
2 12V panels each outputting 5A
In Series: (12V + 12V) * 5A = 120W
In parallel: 12V * (5A + 5A) = 120W
the output voltage = 24V
the output current = 5A
the output voltage = 12V
the output current = 10A
The advantage to series is higher voltage less current = less losses in your wires for any fixed Power.
Wire Resistance = 1 ohm
V = 12V
A = 10A
Loss in wire = 10^2 * 1 = 100W
V = 60V
A = 2A
Loss in wire = 2^2 * 1 = 4W
If you are directly charging batteries then it makes sense to match the panel output voltage to the battery voltage.
If you are planning on using a battery fed inverter then it is best to design the system for the inverter, and select the inverter based on your power requirements.
If you are planning on grid tie then it is best to select an inverter with a DC input as close to your mains supply as possible (120V/240V) and select/arrange your panels accordingly.
As ghurd said, no magic.