She was there at Merkel’s invitation.
Merkel’s a crafty politician and probably knew the reaction Ivanka would get and that it would be used to hurt Donald.