The goals that led to imperial expansion did help to lead to WWI. These goals were largely the desires for economic prosperity, military power, and national prestige.
In the late 1800s and early 1900s, there was a wave of imperialism in Europe. Various European countries, from large countries like Germany to small ones like Belgium, scrambled to take large empires. They felt that large empires would make them richer by giving them sources of raw materials and places to sell their goods. They felt that large empires would make them militarily powerful by giving them bases that could help them project power around the globe. They felt that large empires would make their countries look strong and powerful, thus increasing their prestige.
All of these goals helped to cause WWI as well. Countries felt that war would prove their military power. They wanted to show that they were strong. They also felt that war could increase their power by allowing them to take more land and by defeating their enemies. Countries felt that war could bring economic prosperity because they would win and would gain new territories. Finally, countries felt that war would bring them national prestige. They felt that it would prove that their countries were superior to others. Thus, all of the goals that led to imperial expansion also helped to lead to WWI.