The government requires people to contribute to a pension system (Social Security). It requires motorcyclists to wear helmets. It forbids people from swimming at a public beach when lifeguards are not present. It forbids the sale of various drugs deemed to be ineffective. It forbids the sale of various drugs believed to be harmful. It does not allow consent to certain forms of assault to be a defense against prosecution for that assault.
The civil law does not allow the enforcement of certain kinds of contracts, e.g. for gambling debts. It requires minors to have blood transfusions even if their religious beliefs forbid it. Persons may be civilly committed if they are a danger to themselves.
Doctors do not tell their patients the truth about their medical condition. A physician may tell the wife of a man whose car went off a bridge into the water and drowned that he died instantly when in fact he died a rather ghastly death.