Intuit interview question

The behavior question is weird