This section of the website will explain about chain saws and the weird things they can do while cutting.
Don't automatically assume the bar is bent! Nine times out of ten, the teeth on the chain is at fault. You hit a rock or a bullet or something harder than the tooth, knocking it back, causing the tooth to be rounded and a little shorter than the opposite tooth. Saws tend to pull to the side of larger teeth, because they are the fist to bite into the wood.
Chain was not sharpened evenly. The teeth are not cut back to the same length on both sides, causing the saw to pull to the side of larger teeth.