They're kinda like Requiem Stands in JoJo's Bizarre Adventure.
The moment a mushroom is obtained it helps the user excel at what they want the most at that moment. In Mario Kart it's being faster, in normal Mario it's being stronger to defeat enemies and in the RPGs it's to heal their injuries.