a downward pull flattens the main. A sideways pull trims or eases the main. Upwind, on a beat of close reach, the mainsheet is almost all downward pull and very little side pull. So how to keep that flat sail shape while moving the boom in or out to conform to the wind angle?
You got it..the traveler.
It's also useful if you don't have a powerful (or any)
boom vang, and can help keep the boom down on a beam reach or close reach. If you're more downwind than that, the traveler becomes much less relevant.