Expectation of conformity may run contrary to a spirit of creativity.
A charter can be contrary to a model of parliamentary supremacy.
A law may be declared contrary to sections of a charter of rights.
A publication of inventions can be contrary to a (public and/or morality).
A prime minister can be contrary to a will of a legislature.