They used to camouflage ships that way, too. It’s called “razzle painting” and it confuses the eye of the person targeting them, because it makes it harder to tell their direction and speed when they’re moving.
The effect works for clothing, too. In cover, it’s also much tougher to pick up the outline of a target.
Breaking up the outline of the target and confusing the eye of the predator is how it helps zebras survive out in the open.