Us seeing Mario hitting Sonic with a fireball at the moment of impact and saying Mario has fire powers is not at all similar to Sonic hitting Mario in the air and us saying he has a homing attack, we don't see how high into the air Mario was since the camera's so zoomed in, for all we know they were only like a foot off the ground. The angle would absolutely work if Mario was on the ground and got hit into the air, Sonic is right around the middle of his body, and with the way Mario's body is angled it'd actually line up pretty well with Mario being hit into the air from the ground,
he's outright being knocked upward
(Also, back on the subject of natural weaponry, you can just
visibly see that Sonic has spikes/quills both in and out of the spin dash so that's also not comparable to the homing attack situation)