Yes, you are right, the military rifle is only for the case of war or the mandatory military training. It's also wrong to believe that there is a military grade gun in every Swiss household, most people leave their rifle at the military or in one central weapons depot run by the state.
I'm not sure, but aren't you allowed to shoot it at a gun range? (as Sportschütze) A friend from Zürich was talking about this topic, but my memories about this conversation are a little blurry.
From what I've heard it's way easier to get a gun permit in Switzerland than here in Germany and the Swiss are allowed to have guns you can't even dream of here (I'm talking about stuff like the semi auto H&K MP5, AR-15/AK derivates, etc.).