Switzerland has managed to avoid getting involved in European wars since 1815 by depending on neutrality (no military alliances), being heavily armed (via a mobilization army like the one Israel uses) and making use of good defensive terrain (a lot of mountains and few ways to get through them). But Switzerland does have come treaties, mainly economic ones, with military implications. This, as many Swiss feared, is now causing problems. One of those agreements, the Schengen system, allows citizens of most European nations (who have signed on to Schengen) to freely travel to other Schengen nations without a visa or passport. Any national ID card will do.
Schengen membership has caused a growing number of problems in Switzerland, in part because many citizens of less wealthy Schengen members have been heading to much wealthier Switzerland to the point that the Swiss felt they could not handle it. The major problems were the criminal behavior and general disorder these unwelcome but legal visitors were responsible for. The Swiss attributed their prosperity and successful neutrality to their unity and dedication to orderliness (at least in public). A growing number of Swiss blamed Schengen for threatening Swiss internal and external security. A 2014 Swiss referendum ordered the government to put quotas on long-term Schengen visitors.
Then came the Islamic terror attacks in France and Belgium during 2015 and 2016. That led the EU (European Union) to try and impose gun control rules on Switzerland as part of an effort to keep illegal weapons from criminals and Islamic terrorists. That made the Swiss even angrier because it threatened Swiss traditions that are believed key to keeping Switzerland out of wars for two centuries. The Swiss point out that they have the highest rate of gun ownership in Europe but the lowest crime rates. Despite this the new EU gun control rules would ban the Swiss custom of having soldiers keep their weapons at home and allowing them to keep these weapons (currently assault rifles) after they left the military. The Swiss point out that the assault rifles veterans take into retirement are modified to no longer fire like a machine-gun, making them identical to the many hunting rifles owned by Swiss. This is unacceptable to the rest of Europe which considers these modified Swiss assault rifles military weapons even after modification and these are to be made illegal for civilians throughout Europe. While only about ten percent of soldiers currently opt to keep their assault rifle after leaving the service most Swiss still understand the importance of a well-armed population. Shotguns, pistols, rifles of all calibers would be useful to protect Swiss from internal and external threats. The EU is also seen as a new kind of threat, trying to conquer the Swiss with threats of economic ruin. Many Swiss wonder if the rest of Europe remembers that threats like that have been tried before and the Swiss refused to surrender.
With a population of eight million and a defense budget of about $9 billion Switzerland maintains a military with over 140,000 trained personnel (plus over 100,000 reservists and former soldiers with training and many with rifles at home). All Swiss males are eligible for conscription but about 60 percent do not serve because 20 percent are physically unfit and the rest do alternative service or none at all and pay an income tax surcharge until they are 30. A referendum in 2013 to end this conscription system was defeated when 73 percent of voters opposed it.