Pergunta de entrevista da empresa Cvent

Flatten Object using array reduce method , why arrow functions are used?