Different minority groups have been (and are still) discriminated against and portrayed in the media in a negative, often demeaning way. However, in order to appeal to a wider audience, the entertainment industry is eager to show that minorities are not bad people, and that they can even be important to the story. This trope is most often seen with a main character who is white and male. If the lead is not white and male, then they will definitely be in the majority where the Magical Minority Person they are nicely given is, well, in the minority. Despite being marginalized the Magical Minority Person is always there to share their wisdom with the privileged lead character, usually in the form of guidance down the "right path" and lessons about tolerance.
Subtrope of Closer to Earth.