Someone might be able to answer this better, but if I understand the question I think there are a couple factors.
One it's neutral, and if really has to be considering it's geographical location. That neutrality is protected by greater powers that have strong historic ties.
Probably the second reason Although neutral, that does not mean they are push overs. They have a highly trained army and all citizens (at least the males I know of) are required to spend some time in military so most of the population has training. Switzerland also invested their money into a defensive strategy . The terrain is difficult to cross and this give them ample opportunity to Create bottlenecks and run opposing armies into traps, basically trap them between a rock and a hard place. Bridges are all equipped with explosives to destroy at a notice which again makes the terrain nearly impossible to cross. Furthermore they have dig in bunkers and many other ways to defend themselves.
So essentially along with being neutral , they are also crazy difficult to conquer and then hold. More pain than they are worth, easier to just respect their neutrality with the knowledge they offer no threat and concentrate your military efforts elsewhere.