It's illegal in NY, at least. I don't know about other states.
https://www.dol.gov/agencies/whd/fact-sheets/71-flsa-interns...
"A hope of X" and "entitlement to X" are not the same thing. I tend to agree that this is likely illegal, but it seems to have been very carefully crafted to have at least a superficially-plausible argument for compatibility with the primary beneficiary test. I don't think it was done in ignorance of the law, but a careful and deliberate attempt to hack around it.