What was the right way for me to react? It would have been a bad idea for me to agree with Steve, raising the question of why I would offer him inferior work. But it would have done no good to disagree either, unless I was willing to enter into an on-the-spot debate with a famously mercurial CEO—and at that moment, I wasn’t.
The answer is easy. Immediately tell your boss that he is using inappropriate language, stop the conversation, and report him to HR. I'm pretty sure this is what Apple's official policy for this sort of situations tells you to do.