Can anyone explain to me why these types of scams seem to always originate in Nigeria? Is there something particularly lax about their penal code regarding fraud or what?
Not sure why you're downvoted for an honest question. Take a look at this research paper linked above by another commenter on why scammers say they're from Nigeria: https://www.microsoft.com/en-us/research/wp-content/uploads/...
The general answer: If the scam emails were more sophisticated, they would attract the attention of smarter, more connected folks. These folks would still end up bailing out, but now the scammer is out the time they spent furthering the scam.
But with a shitty, obviously scammy letter, you are only going to trick an extremely few recipients, but you have a much greater chance that they will actually send money.
The wrinkle that email adds to the scam is that only with email do we have a medium in which a 1 out of 100,000 response rate can still be profitable. Furthermore, there are no gatekeepers between email sender and recipient. You couldn't easily pull a Nigerian scam by spamming Facebook users' walls, because even the most gullible of those users are likely to have a friend who will see and report the scam.