Wiki has the answer
The Group of Seven (G7) is an inter-governmental political forum consisting of Canada, France, Germany, Italy, Japan, the United Kingdom and the United States.[1] The heads of government of the member states, as well as the representatives of the European Union, meet at the annual G7 Summit.
"Since first invited by the United Kingdom in 1977, the European Union has been represented by the president of the European Commission and the leader of the country that holds the presidency of the Council of the European Union;[10] the Council President now also regularly attends."
So it is our fault