There is no particular link between capitalism and imperialism. Ancient Rome, and, indeed, all other ancient empires were imperialistic without being capitalist. Most nations today are capitalist without being imperialist. On the other hand, there is no contradiction involved in being both. The British Empire, for example, was certainly both, and it is highly arguable that the United States (quite apart from its forcible annexation of large parts of Mexico in the 19th century) acted, to all practical intents, as an imperialistic power during the 20th century (and still does today). There was no irrationality or contradiction involved in Communist spokespeople criticizing the U.S. and other major capitalist powers for their imperialism.
The claim that the Soviet Union itself acted imperialistically (which it clearly did) is another matter, and I think you are right to imply that the way Soviet imperialism played out in practice showed a large degree of hypocrisy. However, within the context of Marxist-Leninist theory, Soviet expansionism was justified on the grounds that they were doing no more than bringing the benefits of communism to peoples who had previously been prevented from having their own, spontaneous communist revolution against the oppressive regime of their country’s ruling class. The idea is that nearly everybody (except for the small ruling class) wants to live in a communistic economic system (or would want to, if only they understood properly what it would mean), so that Soviet control over their country was beneficial in that it neutralized the power of the old ruling class, and allowed a communist system to emerge.
Of course, this was almost entirely self-deception, and the actual regimes that emerged were horrible, and largely served the interest of the Soviet Union. Nevertheless, it was sincere (or largely sincere) self-deception rather than straightforward dishonesty. They thought of themselves as bringing the benefits of communism to people who would otherwise be prevented from achieving them (or rather the expected future benefits - Soviet Communists were well aware that achieving the expected benefits of a communist economic system was going to take some time, and would involve sacrifice). In fact, in this regard they were little different from the European imperialists who justified their expansionism on the grounds of bringing Christianity to benighted heathens, or modern America that justifies its invasion and/or control of other countries on the grounds that it is bringing them them the benefits of “democracy” (which is always, in practice, offered only as part of a bundle along with free-market with capitalism). If you think your ruling system and ideology is good, then you can think of yourself as the good guy when you impose it on others, even if they manifestly do not want it, and it can only be imposed by force of arms. From the Soviet point of view, Soviet imperialism was good, and thus not really imperialism in any real, pejorative sense (they were just bringing the opportunity of obtaining the benefits of communism to the proletariat of foreign countries). America generally has just the same attitude to its own imperialistic efforts: we are told (and many believe) that invading Iraq (or Vietnam, Korea, Panama, Afghanistan, etc.) mainly for the benefit of the Iraqi (etc.) people. The people being invaded, tend to think otherwise. Somehow, the regimes that get established when these invasions (or less less drastic types of U.S. intervention) are successful always seem to be more than willing to serve American interests.