If Section of a solar panel is shaded, that string will wish to take in electricity, reversing the flow of electrical energy. Diodes In the junction box protect against that from taking place.
Junction Box https://jayetkb914967.nizarblog.com/30424206/considerations-to-know-about-pv-junction-box-hs-code