The earth wires have been omitted for clarity and would need to generally be connected at all switches and ceiling roses. The wires would even be covered by the protective outer sheath (cable). When the switch is on, electricity flows from the switch within the inbound wire towards the outbound https://stephennyafg.theisblog.com/35012954/safe-electrical-wiring-options