Here let me spell it out for you.
You pick box 1. Guy eliminates a random box.
If box 1 has gold, you switch to a box with rocks, you lose.
If box 1 has rocks, you switch to 3rd box, you win.
If box 1 has rocks, you switch to 3rd box, you win again. (2 possible rock boxes to eliminate, so you have two outcomes)
Switching gives you 2/3 chance of winning, not switching gives you 1/3 chance of winning.
You random pick a box, 1/3 chance of winning
One box is eliminated.
You now have 1/2 chance of winning by switching.
Your chances 'improved' by 1/6, why would you not switch?