

This is so because the magnetic field that the two rods carrying current in opposite to each other but placed parallel to each other have their generated magnetic field interfering with each other. The like poles get aligned together, and as a result of this there is repulsion of the wires.
