You are never legally obliged to work for anyone for free, unless a judge imposes this on you. Any contract you sign that says otherwise will lack legal enforceability. Just signing a contract doesn't make a contract legally binding. The contract itself has to conform to the law. It would be utterly illegal to force someone to work for free, and anyone who has any record that they are claiming this should submit it to the relevant authorities wherever they live.
The practice of withdrawing payment for work is probably illegal too. If you do the work, it is your money. That the payments are going through the company is of no relevance. They have no more right to withhold the money than they have to dip into your bank account; the only difference is that they actually have the ability to hold your money if they already have it. As this will probably be against the law, if they do so, initiate a small claims procedure against them. They are gambling that you won't do so. So do so.
Agencies offering to provide essays to students for the purposes of plagiarism may very well be breaking the law. They think they are getting around it by claiming they discourage plagiarism, but this isn't enough if they are not doing so in practice (which could be easily shown). There hasn't been any case brought against them, but should there be, it is only then that the legality of such activities will be determined, both in respect to the writer and the agency. By working for them you are taking a risk that you may regret later in life.