What it's for
Port 123 is the default port for NTP (Network Time Protocol), the protocol nearly every computer, server, and network device uses to keep its clock synchronized to an accurate reference time. Accurate time matters more than it might seem — TLS certificate validation, distributed system consistency, log correlation across servers, and authentication token expiry all depend on clocks actually being correct.
Protocol basics
NTP uses UDP for its lightweight request/response exchange, where a client periodically queries a time server and adjusts its own clock based on the response, accounting for network round-trip delay. NTP servers are organized in a hierarchy of "strata," with stratum 0 devices being highly accurate reference clocks (like atomic clocks or GPS receivers) and each subsequent stratum syncing from the one above it. NTP has historically been abused in amplification-based DDoS attacks, which is why publicly exposed NTP servers should have query response monitoring/rate limiting in place.