'Wow, that's taking the piss big time. Is there no visa system to prevent this?'
Well, yes, there is. The spouse of a British national has to apply for a very expensive visa. He/she, also has to prove, via financial statements, accommodation, job offers, etc. that they will be able to live in the UK for two years without recourse to public funds.
There are rules governing immigration for people who are Commonwealth nationals, spouses/fiances of British nationals, EU/EEA nationals and non-EU/EEA nationals.
Nigeria is a non-EU/EEA national.
That's how it works.