The punishment being justified depends entirely on whether or not the law itself is just (e.g. capital punishment is largely considered to be a legal injustice). Whether or not responsibility is transitive a separate, but important, matter.
As it turns out, responsibility for statutory laws is only transitive when applied to a party to the statute (e.g. a lawmaker or the enforcer).
A thief is responsible for restitution because depriving someone of their property is violation of natural law. A party who breaks a contract is responsible for fulfilling the terms they agreed to, because they made that agreement.
A thief, or a party who breaks a contract, is not responsible for a _statutory law_ enforced against them (unless they are a law maker or the law enforcer).
The creators and enforcers of the statue are responsible for creating it and enforcing it. They are responsible for its outcome, whether that is a dead murderer or a dead baby.
And if the contract is "you can live and work here if you don't have a baby"? Let's say a hypothetical government doesn't touch the woman, but they insist the woman do something to avoid raising too many children.
As it turns out, responsibility for statutory laws is only transitive when applied to a party to the statute (e.g. a lawmaker or the enforcer).
A thief is responsible for restitution because depriving someone of their property is violation of natural law. A party who breaks a contract is responsible for fulfilling the terms they agreed to, because they made that agreement.
A thief, or a party who breaks a contract, is not responsible for a _statutory law_ enforced against them (unless they are a law maker or the law enforcer).
The creators and enforcers of the statue are responsible for creating it and enforcing it. They are responsible for its outcome, whether that is a dead murderer or a dead baby.