>>>>but why the influence?
So called "poor" countries often get aid from different parts of the world.
This can be the USA, Europe, Russia, China etc.
The problem is if they don't get it from the "west" (USA, Europe) they may well get it from the Russia, China etc.
So, for example, at the moment we in the "west" have a problem with the Taliban / Al Qaeda.
By giving money to say Pakistan / India / Afghanistan these countries are more likely to allow us ("the west") to have our spy "listening posts" in their countries, to allow us to have our "spies" in their country, to allow us to have our military bases in their country, to allow us to put our naval ships in their ports and so on.
They are also more likely to work WITH us by reporting to US any concerns they have about the Taliban / Al Qaeda etc. in their country
If we are "friendly" to them they are also more likely to buy our military equipment such as planes etc.
I am sure the whole subject of aid to poor countries is a very complex one, discussed by world leaders at their conferences, and by senior politicians and civil servants from all countries.
While we may like to think we are doing it to help these countries I am sure there is a certain amount of "what we can get out of it" as well.