It's a concept in Swiss law that obligations are symmetrical, and the periods are quite long (three months, and not only for employment, but for other contracts as well, like renting).
If you are dismissed on the spot, you'll get three months of pay. On the other hand, if you give or are given notice, you are sometimes expected to continue work. This happened to me ten years ago. My employer expected me to explain to my coworkers how some things work during that time.
Looking back even I found that a bit strange because I understand the thing with doing only harm when someone is leaving. For example by leaving backdoors?