It is legal in the following way: companies are not *required* to make employees exempt: they can pay even employees who would qualify for the overtime exemption as non-exempt (e.g. let them get overtime). So IF the job responsibilities for the two employees would allow the company to treat both as exempt, the company could voluntarily choose to instead treat one as non-exempt, as long as the reason for the different in treatment is not based on discrimination against a protected category, the main ones of which are against an employee due to his/her race, sex, religion, age over 40 or disability. If the company is denying overtime to one employee based on one of these reasons, then the employee may have an employment discrimination claim he/she could bring to the federal EEOC or the state equal/civil rights agency, and/or file a lawsuit over.