During the Industrial Revolution, many inventions were invented that enabled greater, faster and more extensive production. At the same time, capitalism is developing. Capitalism implies the realization of profits made by faster and more efficient production. Faster and more efficient production is achieved, among other things, and through the use of all inventions of the industrial revolution. In addition, higher profits are generated by cheap labor, cheap raw materials. Inexpensive workforce and raw materials involve cutting costs of investment in production as much as possible. To achieve this, it is moving with dominance over other regions and underdeveloped countries, where there are small incomes, where there are abundant natural resources that can be exploited. Powerful and developed countries with developed industries always have an interest and are motivated to dominate the underdeveloped. That's what we are witnessing today as well.
It was a chainreaction. Long story short, the countries were pulled into the war because of agreements they had with their allies. This treaty is what caused the countries to enter WWI, to protect and defend their allied countries who were already in the war.
After the Soviet Union lost twenty million soldiers in WW2, Stalin wanted to make buffer zones around friendly states so they would never be invaded again.