The classic example is Elijah bringing a sacrifice on Mount Carmel while it is prohibited outside the Temple. Another example is writing down the Talmud. Initially, it was forbidden to commit Talmud to writing. But when people's memory weakened, the Sages permitted it based on the same rule.
In general, learning the Torah is the source of strength and also of pleasure. But to understand and remember it, one must die for it. It says, "This is the Torah of a man who dies in a tent." On the surface, it talks about the purity laws for a corpse. But the Torah gives many lessons, and this one can be obtained by analyzing the phrase and seeing a different meaning in it.
One who wants to become wise should study monetary judgments because they require patience and exact knowledge of the Law. One should never be ashamed to ask even stupid questions.
Art: The Sacrifice of Elijah by Aert Jansz. Marienhof