I follow the rules mainly to protect my own health (but also that of others too).
However there are some elements of the rules that I follow simply because I might get fined if I didn't. For example, I'd like to drive to a deserted area of the coast (which would be easy enough to do here in East Anglia) and go for a walk by the sea. I'd only do so if there was nobody else within several hundred metres of me, so I wouldn't be risking my health or that of others. I'm not going to do so though, because (with my luck) I'd probably get pulled over by Pc Plod and fined a couple of hundred quid for leaving my home without good cause.
So the 'important' things in the rules (which actually affect people's health) I'm following because "I feel I ought to" (although I don't really know whether that can actually be counted as 'complying with a moral obligation' when it's mainly my own health that I'm thinking about!).
The things that 'don't really matter', but which are still law anyway (such as not visiting a deserted beach), I'm doing simply to avoid being fined.