The most logical conclusion from the observation that pythons have small leg bones buried in their tail muscles is:
Pythons descended from an animal with legs.
This indicates an evolutionary relationship, suggesting that pythons share a common ancestor with legged reptiles. The presence of remnant leg bones is a sign of that evolutionary history.