theory - michjansen/SAM4S_MontyHall_Game GitHub Wiki
The statistical theory is that it is better to switch because the odds change when Monty exposes one of the doors that doesn't have the door. The basic idea is that the first selection is 33% likely to be correct and it 66% likely for the prize to be behind the one of the other two doors. So when Monty opens one of the two doors, there is still a 66% chance that the original selection was incorrect. This makes it a better to switch.
The wikipedia write up on the theory is very thorough: wikipedia background