Your USB cable knows which end is up by shorting wires
A simple wire short creates the closest thing to actual intelligence your charging cable possesses.

Every USB-C cable contains a tiny chip that tells your phone which end is which. But here's the magic: the cable itself announces its identity through the simplest trick in electronics. Inside one end, two specific wires are deliberately connected together, shorted. Your phone sends out a gentle voltage probe, detects that short, and instantly knows it's talking to a cable rather than another device. This intentional short circuit is the handshake that starts every charging session. What seems like a mistake is actually the foundation of how billions of devices communicate.