Success makes more success. If you're a billion dollar company, you can afford to pay more for employees. This lets you hire better developers, which lets you be even more successful. If you're in a poor country and you're trying to start a company... you're still poor. The fact that you need developers doesn't suddenly make you rich enough to afford the same wages a billion dollar company can afford to pay.
These lower wages mean that good developers in such regions are often swayed to move elsewhere to get paid better, leaving that original area even worse off than it was to begin with.
JetBrains has managed to build a globally successful company in the Czech Republic, where engineering wages are usually about a third of what the US pays. Call it luck, elbow grease, whatever. They did it. From a quick google search, JetBrains pays wages that are competitive with Silicon Valley. They can only afford to do that because they have been so successful. This success is making them even more successful, since they can afford to pay competitive wages, and it probably doesn't hurt (now that they're successful) that the cost of living in Prague is super low compared to much of Europe. But it's not like anyone starting a company in Prague can suddenly afford to pay $120k+ per developer.
This cycle of brain drain is very hard to counteract. Banks aren't usually excited about freely giving out large sums of money to try out this whole "paying people more" thing and seeing if that yields better results than the other tech startups they tried to fund, but failed due to a lack of talent, random chance, or mismanagement.
If a company becomes successful, but they're only successful locally, then they're tied to the low economic success of their area. They don't have any more money than other employers, so they can't pay wages competitive with other places.
I'm no professional economist or anything, so I'm sure I'm missing some of the nuances of the situation, but a shortage in one thing (developers) doesn't somehow imply an abundance in another thing (funding), it just means that there aren't enough developers available within the funding that these companies have available.
It takes a certain amount of dish soap to clean dishes, but an absence of dishes doesn't mean your home suddenly has an excess of dish soap... you might not have any dishes or dish soap!
If the companies had a bunch of money, they probably wouldn't have too much trouble getting developers to work for them... but without those developers, how can they get the money?
Banks don't write blank checks, especially not to people who have no track record of success. If someone has a track record of success starting companies, they probably don't need the banks to give them a loan nearly as much.
The whole thing is a catch-22. There are solutions, they're just not obvious or every smaller economy in the world would already be employing those solutions. Stuff like this might help: https://tulsaremote.com/ It's hard to know.