Explain how imperialism contributed to the outbreak of World War I.