Can I get editorial for this BUTTONS-medium ?

I saw solutions and understood, but unable to understand why particular approach is used ?