An origin story for Tails would be amazing, to see where he came from… a little baby Tails. "Is it of course amazing to have him with Sonic? For sure, because they are, you know, a sidekick/hero ...
These types of tails usually form as a birth defect, a deformity of the spine called spina bifida. And in these situations, doctors will surgically remove the tail with no harm to the baby.