Emmanuel Macron was present because he is responsible for the rebuilding of the cathedral as head of state of the French Republic. The French government, not the Church, owns Notre Dame because of a 1905 ["]law["] that makes religious buildings state property.
Doubtful laws or laws that don't accord with God's law aren't laws.