Had Melville and Hardy hung out together on the playground as little boys I bet this is the kind of argument their teacher would have had to break up all the time.
Just listen to how Thomas is poking fun at Herman:
The great inviolate place [the heath] had an ancient permanence which the sea cannot claim. Who can say of a particular sea that it is old? Distilled by the sun, kneaded by the moon, it is renewed in a year, in a day, or in an hour. The sea changed, yet Egdon remained.
Herman probably grew the beard to compensate.