Plus they can get sued. Kitchens are pretty dangerous places for the unskilled and unfamiliar. Even for seasoned cooks and chefs.
It is a pretty cushy deal for a restaurant owner to get freebies, but yeah, it is illegal to "hire" someone to do work that will ultimately end up benefiting the business end and not pay them minimum wage...and yeah, it IS enforced once someone pulls the plug on it. (maybe a disgruntled other employee that the other post suggested?)
The definition is if it's 'training' and not actually used during working hours then it's ok to not pay. OK, use the kitchen to develop knife skills or whatnot....(which I doubt would work either because that would entail keeping the kitchen open and operating and electric or whatever costs are COSTS)
I know a lot of young cooks do that, but personally I wouldn't. I'd suggest applying to an agency that supplies personnel to catering operations, events and whatnot. They need entry level cooks all the time. It may be sporatic because it's exactly like working for a temp agency, but it's paid income.
If you want kitchen experience and really don't need the money (who doesn't though?) you might volunteer at a large soup kitchen depending on what city you live in. My daughter works/volunteers at a huge one here in San Francisco. Potential employers DO look at the experience and reliability of working to feed the homeless. At Glide they serve over 700 meals per service. That is a LOT of prep that needs doing and kitchens need a lot of help but sadly most of the walk-in volunteers don't have a clue and are more of a hindrance than a help.
So that's just my 2 cents worth.