In the book "An Introduction to the Bootstrap" the authors state that both the permutation test and the bootstrap test can be used to test $H_0:F=G$, where $F$ and $G$ are two different probability distributions. The test statistic used is the difference between the two sample means. My question is, why is the difference in sample means a reasonable test statistic? Distributions are in general characterized by more than their means. The authors even draw a distinction between the cases of testing the distributions vs. testing the means. My guess is that using just the sample means is not ideal, but it is simple to implement and does work if indeed the first moments of the two distributions are different.
Related questions: Is testing the equality of two distributions different from testing the equality of two means? How can a t-test be used to compare the distributions between groups of data? Confused about the Mann-Whitney $U$ test. Does it test distribution equality (pdf) or just mean/median equality?