Frage im Vorstellungsgespräch bei Toast Inc

Why using this specific method, explain me your thought process?