I think what happened is that the government does not want citizens to use Binance and not the other way around, as the government has restricted access to Binance and some services. Here, using a VPN will solve the problem because the company has not officially banned users from Nigeria, and the Referral Code should work in this case.
Nigeria Limits Access to Binance and Similar Platforms Following Previous Ban Reversal
The only case where the opposite happened was when Russian citizens were restricted by Binance, but this was under pressure from the governments of other countries.