You're correct that they are under no obligation to fire the employee on the H-1B. (In theory, they are applying for a "new" job, and them not getting it for whatever the reason isn't an issue for their current job and status.)
However, what OP is missing is that rejecting the US citizen application based on their citizenship is still likely a prohibited discrimination case regardless of what they do with the existing employee.
However, what OP is missing is that rejecting the US citizen application based on their citizenship is still likely a prohibited discrimination case regardless of what they do with the existing employee.