I hope to understand the use of the preposition to gerunds and the overall structure of the following sentence. Normally the use of to is to specify a destination or a purpose but here the way it is used is unfamiliar to me.
The report was relentlessly hostile to the scientist,
interpreting one complex event after
another to his discredit.
I await your answers.