You are looking at elastic vs inelastic collisions and conservation of energy. If the two materials both behave elastically (neither are permanently deformed), than there is minimal energy lost by deformation. On an atomic scale, if the shape of the objects does not change permanently, then no atoms have been moved around and, after the impact, all the atoms return to the positions they were in before the impact. If one or both of the materials deform inelastically (either plastically or by fracture), then a lot of energy is consumed by that deformation so there may be no energy left to produce a bounce. In plastic deformation, the shape has changed so atoms have been moved around and they do not return to their original positions. Even if all the deformation is elastic, different amounts of energy will be consumed by the elastic deformation depending on what kind of atoms you have and how they are arranged. So... some materials will bounce higher than others, polymer materials will bounce differently than metals and one polymer will bounce different than other polymers, and ceramics will bounce different than composites.
This bounce test is a really just a test of mechanical properties under particular conditions.
One other interesting fact... many materials are "strain rate sensitive" so the impact in this test will give different results than a slow gradual application of the same force. Silly putty is a great example of this behavior.
Hope this helps