This is because of the so-called '949 patent that Apple uses in most of their cases against competitors. (For example, in their lawsuit against Motorola that just got dismissed in Chicago.)
Basically, the patent says that instead of freely scrolling in any direction, the scrolling should lock to the major direction that you flick in. (Since obviously few humans can flick in a perfect vertical or horizontal line.)
What's not in the patent, is the other behavior you describe, which sometimes seems (to me) to try to keep the same direction lock in subsequent flicks.