Chatham Financial interview question

Coding questions, like why are you using this method while coding