Perfectly legal. If you are silly enough to agree to work unpaid then they will take the chance.
No, it is fully and ABSOLUTELY ILLEGAL! The many answers came here saying it is fully legal if you agreed on you own to work for a unpaid service, are wrong!
You can volunteer the time only for the registered society for a social service and not to a registered INDUSTRIAL OR COMMERCIAL ENTERPRISE WHICH WORKS AS A PROFIT CENTER! Even if a contract made and signed by you it becomes null and void in the court of law and the act is punishable with employer compensating you fully with overriding cost incurred in court!
Even they engage you for unpaid service (which is in fact comes nowhere under any protective law to the employer of a firm) without you signing NO PAPER FOR THAT CONTRACT also they are punishable by law if everything proved otherwise!
There are number of NON GOVERNMENT ORGANIZATIONS (NGOs) who are non profit social organizations for public cause and they too are now paying wages for all who are engaged by collecting donations from the public! Of course a NON-PROFIT organization can avail the unpaid service of a volunteer!
There is a provision for an employer of a company to engage and train the STUDENTS WHO COMES TO THEM FOR A FREE, UNPAID TRAINING under a college management program but here too the students cannot be engaged in the regular manufacturing activities of the company where the value is added in a product by the work of that person which can be challenged in the court of law!