What is the function of を in this sentence?


> 彼は高齢を理由に社長を辞めたよ。

I found this example sentence in some core flashcards, and the translation
says `He gave up the company presidency due to age.` Which makes sense to me,
but I don't understand the purpose of the first を.

It seems to be indicating what the reason or cause for quitting is, but then
why is 理由に there if を is already showing the reason?

