It is a contract and is completely legal. A contract does not need to be "fair" to both sides, only "reasonable". There might be some argument that this contract is unconscionable, but that is a difficult battle, especially when one has so willingly given up their rights to their material. The court system was not designed to come running in to save individuals just because they have made a foolish deal.