As already mentioned, seat belts are also a matter of safety yet we exempt certain groups from wearing them. Like motorcycling riding, driving is not a right. If safety was the be-all, end-all, then surely we would not permit anyone to drive if they cannot wear a seatbelt.
But we don't do that. We balance a desire for maximal safety against other societal interests and make compromises. An unbelted driver imposes little direct personal risk on anyone but himself. As long as the reason for not wearing a seatbelt is not frivolous as determined by policy and regulation, we permit it.
Same goes for helmet use. The only person at direct personal risk is the rider. Deeply-held religious beliefs cannot be considered frivolous. If freedom of religion as per our Charter is to mean anything, then religious beliefs must be accommodated provided they do not cause undue risk or hardship on the rest of the public or society as a whole, even if it is a choice that we might not take for ourselves.