One reason is that the rulers are not capable enough to change the situation, He may have the courage but sometimes the resources is lacking (machinery, investors, etc.) or the other way around. If they attract more money in their country the tendency is some corrupt government officials take advantage of it, in terms of projects that are unfinished or sub standard outcomes and others line the projects are a total failure. One factor is the security of the nation, if foreign investors felt like the nation is unsecure for example of insurgencies, then it is most likely that there are no will to put money in them. Now in some cases the climate also adds to that, if Nigeria has water resources then it would be a less burden as farming will be needing most of it.
That is not just strictly for Nigeria though, every nation is facing the same issues and that's fine. I think it should be noted that corrupt government is a global problem.
And the main reason for that is because for someone to be nominated, they have to go up the political ladder, as someone who has been involved with politics at a very small level, I can tell you that if you are an honest person who never cracks, all the people around you and above you will work hard to keep you grounded, and that's why I can't really make it change at all, it has to be realized that you need to be a crook, so all the crooks around you make you higher level crook, and keep doing that until you become the president. Rarely anyone goes up without getting corrupted, it does happen but very rarely.