Is it right to break the law in order to enforce that same law?

Imagine the following: You drive on a lonely road but you are in a hurry, so you speed up a little bit beyond the limit, suddenly a police car appears on the rear mirror, if you don't want trouble you just pull over and wait for the cop to fine you, but what if for whatever reason you don't realize and keep at the same speed?... if you are 5 MPH above the limit, the police ought to speed up at least 15 MPH above your speed in order to get you soon enough... So they are clearly breaking the law in a bigger order of magnitude!!! It is clear that in some circumstances the police breaks the law in order to enforce it.

This is just the most obvious example, but I'm sure you can think of many others.

Is this kind of acts correct? Why? What are the moral and legal bases? Are the options of the police limited in some cases? or there's always a way to enforce the law without having to break it?