Domanda di colloquio di Thoughtworks

Why did you code the [coding exercise] in this way?