In each canton there are traditions and ways of doing things, and the mountain villages all have a unique set of rules. It might seem oppressive to the casual observer, but it's the Swiss way of doing things and it seems to work. If you're visiting, try to go with the flow and enjoy it.
For a neutral country they take their security seriously, and you'd be well advised to be respectful of that. Citizens and visitors in Switzerland must carry identification with them at all times. If you are stopped without a valid ID there is a possibility that you may be taken in for questioning by the police.
One of the most well known regulations in Switzerland relates to National Service where each Swiss male has to spend time each year in a training camp which forms part of the military in this neutral country. Swiss men also have a gun in their home which is a part of the military framework in readiness for potential conflict.
During the Cold War Switzerland was famous for stating that each house must have a nuclear fall out shelter. These are still around, and each citizen has a list of emergency items that must be kept in the home at all times in readiness for a civil emergency.
The Swiss have a number of quirky rules and customs that must be obeyed if you want to make the most of your stay.