In addition to the perceived-speed reason offered by the other answers, this interior-pattern animation also makes sense at another logical/analogical level.
The example progress bars are animating in two ways: (1) the area representing progress is widening, with its right-edge moving to the right; and (2) the colored pattern inside is shifting, right-to-left (the 'opposite' direction).
Animation (1) serves to indicate overall progress – and while that edge is noticeably moving, it also indirectly confirms that something is happening.
Animation (2) serves to show that something is happening even when the overall progress-level may seem stuck, or moving imperceptibly.
In that sense, animation (2) is more like a spinner: its motion is not a magnitude indicator (of either rate or absolute progress) but a confirmation, while it is moving at all, that something is ongoing.
Now, why does a spinner usually move clockwise? Because our experience with clock hands strongly associates that rotation with the progress of time.
Similarly, the 'crawling' animation (2) leans on our experience (at least for readers of left-to-right languages) that following a line of text to its conclusion causes the text to move from right-to-left under our gaze. The same goes for a typically-rendered timeline, where later periods are notched to the right. Reviewing it from past to future makes its ticks move right-to-left in our vision. (The same is also common for chronologically-ordered photo-albums which animate photos in and out: moving to later photos sends the earlier photos off to the left while later photos enter from the right, as if on one long filmstrip.)
The widening bar itself is thus a sort of window onto an abstract surface; the fact that the textured surface is moving right-to-left indicates moving towards the future/completion. (The fact that this animation, contrasted against the rightmost edge of the progress bar, also tends to make that magnitude-edge look like it's moving rightward even when it's temporarily halted is another visual bonus.)
You will occasionally see 'crawler' activity-indicators that don't even try to indicate overall progress via growing width. They just have a fixed-size rectangle of candy-striping or other texture. That interior pattern often also moves right-to-left, as if scanning text or other linear media... but also sometimes moves the other way, as if rolling/drilling something forward. (I suspect that it is when people view the texture as representing their busy worker-agents, rather than scanned subject matter, that they see left-to-right as progress. For example, the mental model may be one shared with side-scrolling games that start on the left and move right. The character moves right, the background moves left.)