That varies by jurisdiction and this wasn't in the US. Even if free were illegal it could have been minimum wage. But I think you're right in that it doesn't fit in well with established processes (HR, etc)
Also, copyright. If you're not paid, they don't fully own the code in any product you've worked on.
True, but in this specific case I wouldn't be programming or creating content. It was management.