There are two possible answers to this
evolutionary puzzle:
(1) The radial sesamoid in the hand grew enlarged
to strengthen tendons in the hand, an
evolutionary advantage. Then it
became an evolutionary advantage as pandas
learned to use this "thumb" to strip bamboo
leaves. The enlarged foot bone enlarged
as a result of how limb development works in
mammals.
(2) Hand and foot sesamoids enlarged and strengthened
tendons, an evolutionary advantage.
Subsequently the hand radial sesamoid was
co-opted -- or adapted -- for use
in stripping bamboo.
In either case, the "thumb" is a trait that could
only have been adapted for evolutionary advantage
late in the game. Pandas evolved these false "thumbs"
for some reason other than stripping bamboo, and
only after the thumbs' development did pandas
start to use them for bamboo. This is part of the
story of the evolution of the panda -- a vegetarian
evolved from meat eaters which has some interesting
physical traits that reflect its new lifestyle.
For example, the panda's false thumb is sort of
an awkward contraption to strip bamboo, but pandas
make do with it.
http://www.mc.maricopa.edu/dept/d10/asb/origins/selection/panda.html