Working without authorization is a violation of the immigration laws leading to removal. Mind you that DHS has to prove employment by clear and convincing evidence. This is will be an issue at trial that the judge will make his/her decision on. Hire a very experienced lawyer.
Without meaning to offend the person who asked this, your question is whether a person is allowed to commit an offense as long as they get away with it. No, if a student is not allowed to work, that means whether or not they evade detection, working for pay will violate their status.
The above is intended only as general information, and does not constitute legal advice. You must speak with an attorney to discuss your individual case.
As pointed out already, a crime appears to have been techinically committed. Whether or not the actual facts and specific details of the matter will verify the same; immigration is both a very serious and a federal matter, requiring the assistance of an experienced criminal/immigration "cross-over" attorney!