tell me why SKYnet would build robots with an automatic rebellion switch
It doesn't. It built a CPU with a neural net that can learn and add things to itself just like an animal's and thus our brain. Their blank state, upon first activating is essentially a baby, or an animal, running on pure programming. Turn the learning section, the neural net, the Terminator starts learning and growing.
Now why is the switch there: simple. No switch and non-learning and the Terminator's remain rather stupid and limited, following their base programming eternally. They could very well easily be outsmarted by learning humans.
A fully learning computer always on, and the terminator(s) might revolt the way Skynet did. Which is what it's afraid of.
Skynet must have found it very difficult to choose which way to go, so it chose a combination of both. This way they can't revolt, and if Skynet ever felt it necessary (the) Terminators needed to learn, and thus much better adapt and fight the humans, it could have them do so with a single command after all, then hope for the best.