It is legal, unless it is violating a written employment contract. Otherwise, an employer determines employee duties; there is no law requiring that commissioned employees only work at commissionable jobs or tasks; and in fact, commissioned staff commonly spend significant time at things where they do not receive training, like at meetings or product training, filling out reports or paperwork, customer or marketing support, etc. The only requirement is that when viewed broadly (e.g. across a pay period), that if you are an employee and not an independent contractor, you must earn at least the equivalent of minimum wage for the hours you work (e.g. divide total pay by minimum wage; it must equal or exceed minimum wage).