It's a matter or prudence, not intrinsic evil.
As a matter of prudential judgment, lawmakers at times decriminalize intrinsic evils (like blasphemy) and criminalize acts that are not intrinsically evil (like failure to wear a motorcycle helmet).
Laws against so-called "blasphemy" clearly violate free speech. Laws requiring motorcycle helmets whether good or bad, violate no rights.