The role of the magnetic fields in GRB outflows