The cable was probably already plugged into the same switch. You caused a hard-loop.
It was probably an unmanaged switch. An unmanaged switch cannot participate in spanning-tree, and therefore cannot detect the hard loop. Because the loop wasn't detected it caused a broadcast storm, bringing down the network.