This is because the production value and musical vision & execution of mainstream rap has been very high for a long time. Combined with the extremely low cost of entry (a microphone), most bad rap is solo indie production and most stuff that gets picked up by labels is high quality on the genre's terms¹.
This has recently become true of pop as well, which is one of the defining qualities of the "poptimism" era. It's not that all the music critics simultaneously sold out and started giving undeservingly good reviews to pop, it's that the baseline standard of musical quality in pop became very high.
¹: There has always been, and continues to be, a subsection of rap that also succeeds on musical terms inherited from outside of hip hop, especially from jazz. This is usually what people who are not extremely into hip hop mean when they talk about "good rap." But someone who doesn't appreciate the role of eg lil wayne & young thug is frankly not informed enough about the genre & its conventions to have a useful opinion about quality within it.