Many historians debate whether New Imperialism can be primarily attributed to economic gain (getting resources for cheap at the cost fo underdeveloped nations) or political (becoming the largest power in the world by dominating the most space). The two come hand in hand, and because most countries didn't resist it, it was mainly the US that had to nix one of its political theories to join the race for power that was New Imperialism by abandoning their standard of Isolationism and starting to create colonies themselves. If we were to find an anti-Imperialist political belief that grew in popularity during the late nineteenth century, we would look no further than Marxism, or the idea that the means of production of a society should be owned by the working class, and there should be no ruling class.
Prior to the late-nineteenth century, the US had touted itself as an isolationist country that didn't get involved in issues outside of the land it was trying to claim (what we now know as the continental United States). They didn't accept the concept of Imperialism, which had existed for centuries but most recently was practiced from the 1400s through the early 1800s by countries like France, England, and Spain where they would build colonies and empires in other countries for access to their resources, often by force. America was one of those colonies before it wasn't, and France had claimed Canada and the middle of the US before America became independent as well. The influences are still far-reaching today, and the modern person would be horrified how Imperialist countries treated many of the indigenous populations they reigned over.
While it's objectively hypocritical that the US would pursue the same imperialism they had fought against just over a century earlier, after New Imperialism took off they decided to start claiming countries like Guam, Puerto Rico, and the Philippines as territories. Why would a country so seemingly against foreign rule and "taxation without representation" turn against the very concept it was founded on?
Between 1870 and 1890, Britain, France, Germany, and Japan scrambled to seize territory in the underdeveloped world. This was mainly due to an economic crisis in 1873, which pushed these countries to find new ways of maintaining their top spots of power. But it was also enabled by the Industrial Revolution and the new weapons that came from it. With more firepower, these countries could easily dominate tribal lands without getting too involved in them (prior to this the biggest "success" had come from England investing in a rebel group in India to claim the country's resources).
The European and Asian Imperialist forces took over much of Africa and Asia, and the US feared that they would not be considered a significant power if they didn't join in. Basically, the US was getting FOMO so hard that they abandoned their isolationist principles and hopped in on the game. These countries created colonies amongst African and Asian nations, and the lack of morals starts with the idea that colonies always benefit the Imperial power at hand, often while causing political and humanitarian devastation to the land they are using. ECONOMICALLY, these countries practicing Imperialism gained resources (diamonds, gold, rubber, oil, timber, etc.) at little cost to themselves and at a huge cost to the nations they took over.
So economically, the Imperialist countries were thriving and capitalism reigned. In the US, the political climate had been restricted to Isolationism, which is where the politics and economics of the US clashed, with economics coming out on top in the end. The practice of isolationism was not evident in England/France/Germany/Japan however so for those countries, I think the debate is more "why Imperialism over something else." Because Imperialism was not assumed at the time to be a necessary aspect of capitalism, some historians claim that these countries took over underdeveloped nations because war meant power and taking land meant war.
Last but not least, because I know this is a lot of information, Marxism came to fruition in the mid-nineteenth century (1848 specifically), and was extremely anti-capitalist. It was and is a political belief of "power to the people", that the means of production should lie in the hands of the populace, and there should be no ruling class. Imperialism was the opposite, with its mass exploitation and human rights violations. Marxists urged the colonies that were being exploited to revolt, with slogans like "Workers of All Countries, Unite!" and "Oppressed Peoples, Unite!". Politically, Marxism was the antithesis of Imperialism and was the strongest anti-Imperialist belief system at the time. It paved the way for freeing the countries that were oppressed, and made possible many revolutions to come.