"Sanctio" means "a decree, enactment, or law". It is the source of the English word "sanction," which originally meant an official authorization or permission.
Over time, the meaning of "sanction" has evolved to also include "a penalty or punishment imposed for breaking a law or rule". This usage is a bit more nuanced and arises from the idea that a law or rule provides a framework within which certain actions are sanctioned (allowed) and others are not.