It is so that balance can be adjusted between the front and rear brakes more easily, often times by the driver as he races.
In a regular street car, there is a proportioning valve that determines how much pressure goes to the front brakes, and how much goes to the rear. The proportioning valve generally puts the back brakes on first, but then limits absolute pressure to the rear brakes. That way, the rear brakes come on early, holding the car straight, but never come on hard enough to lock, which usually results in spinning the car.
In a race car, the brakes should be set up a little differently. The rear brakes should be on the verge of locking in a fast stop, because the driver can then use the brakes to put the car into a controlled oversteer condition on the way into a corner, getting the car to rotate and point towards the corner exit so that the driver can switch to the gas pedal sooner.
Keeping the brakes adjusted this closely is difficult, because changing fuel loads, track conditions, or brake wear can subtly alter the point at which the rear brakes start to lock.
So, a dual master cylinder setup is used. There is an adjustment that the driver can make on the fly that shifts mechanical advantage from one master cylinder to the other when the brake pedal is pushed. This allows the driver to fine tune the braking system, keeping it set exactly right as the race progresses.