It is not right that the door switch causes the circuit breaker to trip - there is a fault with the machine.
It may be the switch itself but that would be most unusual but it's more likely that the door switch is allowing power to go to the device that really is causing the fault.
Either way the dishwasher has an electrical fault causing too much current to flow. There's a "short circuit" type fault with an electrical component.
A switch in the on position is always a short circuit so it strongly suggests that the switch is working correctly.
Peccavi, February 2009