While I see your point, you have to consider that Ralph is there due to popularity reasons.
He's the cover guy and the hero of said movie, people will recognize him regardless if they saw the movie or not... However despite that the racer tot? child? (I don't know how old is she exactly) is more fitting her addition into the roster instead of Ralph's would have lead into millions of people asking "who the heck is she?" and "what on Earth is she doing here?"
That can also be applied for other characters such as Jacky Bryant, from the Virtua Fighter series known for being an Indy Car racer plotwise, never made it into any of the all-stars racing games mainly because Virtua Fighter became a really obscure series and a lot of people does not know who he is... As a matter of fact, "his" place in the roster was taken by Danica Patrick, a well known NASCAR racer, in the second game (quite the blunder in my humble opinion, NASCAR is known in American territory while other racing competitions (such as F1) are known everywhere... people outside the States (and Canada) won't know who the heck she is supposed to be nor why is in there... If they planned on exploiting a real life racer's popularity they should have gone for people like Mark Webber or Fernando Alonso instead).
But that's just my two cents anyway...
.P.S.: However the only wasted, wrongly chosen and inexplicable spot in the roster is without a doubt AGES.
Yes, I'm fully aware what they tried to do there... It's a gimmick to SEGA itself as a first party, as console maker... The pilot is a VMU while the car is a Dreamcast control pad...
...However, SEGA already had a gimmick more fitting for that spot, a gimmick that has made quite a name for herself real quick to the point of starting her own series (the thrid installment will be hitting European stores in a couple of months), was based on a console (the cancelled Sega Neptune) and had a lot of similarities to Sega's last great console and the most innovative ever made (Sega Dreamcast).
Even if it wasn't made entirely by SEGA (they heavily supported the project), considering their involvement into the project they wouldn't have found troubles for adding that character into the game, she would have been the perfect addition.
I mean... you have a SEGA console tan, a known and loved one... and you pick a VMU? WTF?
SEGA never looked so lovely before