A cricket flashing is basically a diverter. As water runs down the roof toward something like a chimney, water, ice, snow, and debris can build up behind the chimney if it is just a straight wall. But when you add a diverter like a cricket flashing it forces the majority of it to either side of the chimney (or whatever roof penetration it happens to be.
A cricket is very important to keep roof penetrations from leaking or deteriorating too quickly. If you have one, check to make sure it is in good working order and properly installed (unlike the one in the picture).