It is perfectly legal from the employee's perspective: there is no law or legal requirement whatsoever that an employee's pay have anything to do with the amount billed the clients. The two are simply irrelevant legally to each other. Now, if the employer is biling clients for work not actually done, or otherwise violates the service/work agreement with the client or defrauds the client, then the client may have grounds for legal action--but that has no bearing on employee pay.