This also applies to the rear suspension, or anyplace where one desires to transfer weight from the outside wheel to the inside wheel.
A sway bar works by transferring weight from the outside of a corner to the inside. Without a sway bar, in a corner, almost the entire vehicle weight is resting on the outside tires, while the inside tires are doing no work at all. A sway bar us shaped like this: \_____/ . By pushing down on one of the ends, you can see how it will push down on the other end. In practice, these ends are connected to the unsprung suspension by end-links. When the car tries to lean to the outside in a corner, the sway bar forces the inside tire against the ground, so it has to do some work, too.