Ceaseless, decades-long propaganda that US is being taken advantage of and that America should come first certainly played a part in inflating that number in minds of a lot of people. When it comes to stuff like this I think that most people just go off the vibes and don't really have any reasonable idea how the budget is divided up.
Russia’s foreign aid is also primarily development assistance, though much less than the US, UK, EU, and China.
Moreover, the US’s larger defence budget also reflects its self-assumed role as the global stability guarantor of the post-war order it built for its own benefit. It’s that order that made the dollar the world’s reserve currency, requiring most of the world to invest in American financial instruments, and which gave it and its companies an outsized advantage for decades.
That was not an international order built for benevolence or which harmed the US. Americans are going to deeply regret how their place in the world and personal wealth shrinks after this administration is done.
I can't parse what you mean by "China and Russia whose GDPs are far larger". Larger than what? China's GDP is about 3/4 that of the USA and Russia is about 1/10th.