Bootstrap/Permutation test for equality of two distributions

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.

Edit: Related portion of textbook:

• Can you show us the relevant excerpt of the book?
– Ben
Oct 29, 2020 at 6:08

Even an ordinary two-sample t-test tests equality of distributions under the null, but few people would describe it as a test of equality of distributions. Nevertheless under the assumptions, that's what you get if the null is true, and when the means differ, certainly the distributions differ ($$F\neq G$$). If you reject you don't just say "the distributions differ", you conclude the means differ, so even though between the assumptions and the null you end up with $$F=G$$, that difference in means is really what its testing. You can't conclude that the variances differ if you reject the null, it doesn't detect that (indeed, you assume its absence!)
With a permutation test (for example) with the difference in sample means as a test statistic, you also get that (between the assumptions and the null) that $$F=G$$ -- you need exchangeability under the null; essentially, exchangeability implies that if you swapped values across groups you wouldn't change the underlying distributions. But if you reject, you don't say "the distributions differ", you conclude that the means differ, because that's what the test is sensitive to.