In English, we could answer the question "Who ate the cake?" with
It was him.
I don't know the reason why we use the accusative "him", even though the person is the subject of eating the cake, not the object.
In German, is it the same?
Wer aß den Kuchen? Es war ihn.