The law did grant them powers to run pieces of this scheme that a judge decided they took way too far. And they got to run it for years before a judge stopped it.
And AFAIK no one running Macy's went to jail, so the penalty isn't the same as I'd get if I, say, imprisoned my neighbors and stole their credit cards to get payment for packages I think they stole from the porch.
They exceeded what they could legally do, and were stopped.
Contrast that with, say, civil forfeiture. Cops can stop you for little reason, and if they find cash in your car, they can take it. It's all perfectly legal. This is not theoretical, it happens all the time and enormous amounts of money are installed.