why is it better to run on firm sand? Presumably there's less impact on the non-firm stuff but I guess you are also landing/taking off different because in effect, you are on a moving surface.
Running on sand is easy on the joints because on the landing phase the sand gives, thereby absorbing energy. It is basically a bit of a shock absorber.

However it also is more costly energy wise as when you push off the sand it gives a bit thereby absorbing some of your energy. You'll really notice that when you run on loose dry sand. With the smooth damp sand that is more compact (eg sand below high tide) the effect is less pronounced. This energy cost might slow you down a bit (easier to sprint on a hard surface or a springy surface) but it doesn't do you any harm.