Why do police cars have flashing lights?

To draw attention and warn of unusual movements, to signal other traffic to move to the side and stop.