Their governments decided that if they wanted to improve the economic situation, they needed to take action together. To bring the economy back on track, they needed to sit together and make economic policies. Because of this, there were some informal meetings in the White House, USA between the finance ministers of these countries. It was in early 1973, that the finance ministers of the USA, France, the UK and West Germany met.
Two years later, they included Italy and Japan. And in 1975, the first G6 meeting took place. This was the first official meeting. After this, in 1976, Canada joined the group. And the G6 group became the G7 group. These seven countries were among the most developed countries of their time. Their economies were among the top economies in the world. But there were many other commonalities among them. All these countries were liberal democracies and promoted values like human rights and individual freedom.
Politically, during the Cold War, these countries were part of the Western Block. So you can say that they were ideologically similar too. And economically, of course. They were struggling with problems like the oil crisis and recession. So their main aim was to sit together and make economic strategies.