There are various causes of the Mandela Effect, the honestly-held memory of an event that did not happen. The three most plausible are:
a) Your memory is correct. In the case of Mandela dying in the 1980s,
this could well have happened but he was too useful a figure for the post-Apartheid era so a doppelganger was used and official records adjusted. Alternatively, the original death could have been a hoax to try to stamp out the anti-Apartheid protests, which failed.
b) There is an unproven theory that there are an infinite number of universes where every possibility is played out. In other words, there is a universe that is exactly the same as ours, except for the fact Mandela died in the 80s. Somehow, people's memories from one universe have been merged with our own.
c) We're living in a computer simulation. (This is actually highly possible, arguably it's more likely we are living in a simulation than this being reality.) In our reality, computers are reset, saved data is wiped, but traces are still left on the hard drive. It's equally possible that our data from one fork of simulated reality has traces from another fork.
Personally, a) seems the most likely, if only because it's the easiest to understand. History gets written and rewritten - "facts" can be changed. It reminds me of Nineteen Eighty-Four, where Winston Smith knows for a fact that aeroplanes were invented before Big Brother turned up, but officially - and in most people's mind - Big Brother invented them because every record says that he did. He who controls the present controls the past, and he who controls the past controls the future.