We formulate an optimal load control (OLC) problem in power systems, where the objective is to minimize the aggregate disutility of tracking an operating point subject to power balance over the network. We prove that the swing dynamics and the branch power flows, coupled with frequency-based load control, serve as a distributed primal-dual algorithm to solve OLC. Even though the system has multiple equilibrium points, we prove that it nonetheless converges to an optimal point. It implies that the local frequency deviations at each bus convey exactly the right information about the global power imbalance for the loads to make individual decisions that turn out to be globally optimal, and allows a completely decentralized solution without the need for explicit communication among the buses.