Step-by-step explanation:
The full form of LED is Light Emitting Diode. It is a semi conductor source of light which when electrons passes or flows through them, it emits light. In the semi conductor, the electrons recombine with the electron holes to release high amount of energy. This energy is called photon.
When the LED direction is flipped in the breadboard and back to the original position, the LEDs are forced to be grounded. They will not be able to function without being grounded.