According to Charles Darwin's Theory of Origin of Species, an organism either develops or losses an attribute according to its adaptation to survive in a competitive environment. This is same with humans or salamanders. The loss or the retention of limbs may indicate the survival purposes of the species.
The ability to regenerate lost legs and tails in salamanders is due to their stem cells. Scientists need to understand the difference between stem cells in salamanders and humans in order to apply it.