The circuit works because when one switch is closed, only one light bulb lights up. Each switch only activates one light bulb, and does not affect the rest. The first person to close the switch, his/her light bulb will light up first. When all the switches are closed, the light bulbs will be of equal brightness, as the current is equally split.
We can also use different colours for the light bulbs, so that the judge can differentiate who pressed the switch first more easily.