Governments subsist on tax dollars from their citizens, supported by the competence and integrity of government officials, and supplemented (in the case of developing countries) by the donor community.
Many developing countries do not have fully developed tax codes, nor do they have an honest and prosperous citizenry that pays a useful amount of money in tax dollars. Even assuming honesty and good will all around, the needed infrastructure and the capability simply aren’t there yet - it’s a work in progress. This shouldn’t be surprising when an entire nation suffers from a legacy of bad education, colonialism, and assorted other ills that typically plague developing nations.
Progressive, first-world nations - I’d put the Scandinavian countries at the top of the list myself - work hard to develop good governance, free and fair elections, decent capacity among government officials, and so on. But those are efforts with a view to the long term. Teaching a ministry about better procurement procedures is a very good thing (and something my office is working on right now, in Indonesia.) It won’t feed starving orphans or educate kids in a remote village, however. If governments don’t have the cash or the ability to reach all their suffering citizens, and aid dollars are stretched to the limit doing what they can to help, and there is STILL unmet need, who steps in? Often, it is the charities you seem to dismiss in your OP.
If you don’t want to give to international charities, fine - don’t. But don’t justify this decision by claiming that “the government of Chad should do it - if I give money, I’m supporting a corrupt regime, so I’m actually more moral if I keep the money for myself.”
That’s an absurdly simplistic view of the world. Spend your charity dollars in your own country if you feel more confident that the cash will be better spent. Or educate yourself on which international charities do work that you can support (Doctors Without Borders and Planned Parenthood International are among my favorites, but that’s just me - your own research might lead you in a different direction.)
But don’t justify your decision not to give because you smugly think you are avoiding propping up corrupt regimes. Uganda or Chad or Indonesia or Mozambique could have the most fantastic government in the world starting tomorrow, and there would STILL be unmet needs among children, women, and other vulnerable populations. International NGOs do so much good work to help the most desperate people in the world. Supporting them doesn’t in any way hinder the development of a good national government. On the contrary, it sets a fine example of what organized, competent, caring people and organizations can do in the world.