Judging the act not to be subject to criminal sanction is very far from judging it to be "the right answer", or even legally permitted in systems which have both criminal and civil remedies.
If its the effect of the law and legal system, it is not unlawful for the burden to be placed there, even if the individual takings are unlawful. Whether its unethical or not is debatable; its basically equivalent to the government taxing sales of food and using it to fund feeding the indigent (since the grocers costs of doing business are recouped in the prices charged to customers), which (while rarely explicitly done with food) is actually a not-uncommon model for providing goods or services deemed essential (that is, taxing sales to those who can afford it, and using the proceeds to subsidize those who can't.)