Free isn't exactly illegal. Theres a set of criteria for an employee (aka intern) to be able to work for free. The biggest criteria is that the work can't directly have an impact on revenue, e.g. no free sales positions.
"Volunteering" at a for-profit company is indeed against the law, in that it violates minimum wage laws. There is an exception as noted earlier for training positions, but real work generally doesn't qualify.
http://www.nytimes.com/2010/04/03/business/03intern.html