I think you just typed the answer in the 2nd paragraph:)
ATP is energy in your cells
All cells are not the same because each cells conduct different functions. Each cells have a specific task.
Does Natural selection or evolution involve with this? it sounds like spiders and other Insects or bugs that have evolved to be able to have limbs in order to survive in a environments that would require extra limbs. probably from genes being passed on and also being mutated positively in order for the newer species to better adapt. the pair of legs could have been increased because of the environment that requires it and also as the mating changes it's basically survival of the fittest.