I'll give this one a shot.
There are many factors that go into why an artist loses any relevance they once had. The main ones that I can really come up with off the top are simple. Maybe one reason by itself isn't enough, but a combination of them are proven deadly.
First, they cannot adapt to the times. Look at rappers like soulja boi, warren g, j kwon, (insert generic rapper here), etc. The styles they had were perfect for the time they came out. Whether innovative pioneers or more of the same, they sounded like the music that can define that era. But they never evolve properly. They continually try to renew their popularity, eventually looking desperate. No one likes to see desperation.
Second, the general styles of rap are constantly changing. Think of the flows back in the day. Th
ey stayed around for a while because the internet wasn't around to spread new material rapidly. Those guys honed their sound for years to become the sound they wanted. As soon as a new style became popular they were old news. Look what happened when 50 cent came out. He single handedly killed an entire wave of rap with his style. It was new, heavy, and insanely catchy. The older guys couldn't hang.
Thirdly, their lives change. Struggle rap is real because most fans can relate. When they talk about having no money and selling drugs to make ends meet, there are way more people doing that than driving bentleys and rolls Royce's down their old streets and fukking models. Once a rapper reaches that perceived level they become unrelatable. Take eminem for example. He blew up because he rapped about a life many had experienced, or at least had striking similarities to the average listener. That's why he had such a cult following in his day (him being white attributed to that, but you can't get by with that factor alone, he had the skills). But once he passed the threshold to money and options, he wasn't your average guy anymore. He lost a significant amount of steam after that (as well as drugs and craziness, but the point still stands).
And fourth, they just get old. They move on into different facets of life. Ice cube, ice t, dr dre, busta, run DMC (specifically rev run), and a plethora of similarly nameable and well known rappers. They used their popularity and, probably more key, their versatility, to stay relevant in other ways. Usually acting, but many stay in music behind the scenes as producers or label owners/managers. Those are the guys that knew rap careers had an end point so they just slowly migrated to other careers