whose job it was

In ancient Rome, when a victorious general paraded through the streets, legend has it that he was sometimes trailed by a servant whose job it was to repeat to him, "Memento mori".

I found this sentence from 'Steve Jobs', Chapter 35, I wonder if the last "it" is unnecessary here. Why it is used here? Is it possible just a typo or any mistake?


We do not need "it" in

The servant's job was to repeat to him, "Memento mori".

We do need "it" in

It was the servant's job to repeat to him, "Memento mori".

So, whether we use "it" in the quoted statement depends on which of these two we are thinking of when we write it.