Yes, it is very dangerous to connect different packs in parallel while they are still connected in series as you are effectively shorting out each of the packs
(hence the big spark! ).
If you look carefully at your diagram below, you should be able to see that by connecting the negative terminals of packs 1 and 2 together you are effectively shorting the negative terminal of pack 1 directly to the positive terminal of pack 1 as it is already directly connected to the negative terminal of pack 2 via the interconnecting wire.
Connecting the positive terminals of packs 1 and 2 together will effectively short circuit the positive terminal of pack 2 direct to the negative terminal of pack 2 which is already directly connected to the positive terminal of pack 1 via the interconnecting wire.
Before you can connect the packs in parallel for charging, you must first disconnect the series connections to prevent any short circuits from occurring.
Similarly, connecting the balance lead connectors in parallel while the packs are still connected in series will also result in a short circuit through the balance leads.
To charge packs in parallel, they must be identical in voltage, chemistry and number of cells
and there must be no series connections between any of the paralleled packs.
To run packs in series, there must be no parallel connections between each of the packs in the series.
Hopefully you will be able to understand at least some of the above.
Alan