Turns out, Mephisto and his ilk–all the devils and demons–were created by the soul gems. So naturally, when Thanos collects all five, Mephisto decides it’s time to be a henchman.
And the fact that Thanos is up against Silver Surfer is just icing on the cake.
Remember that Mephisto story from Bring on the Bad Guys? I must have read that book a dozen times as a kid.