After PeriodicKillSecondaries does a pass of crashing the secondary, it runs validate followed by checking dbhashes.
However, the secondary upon coming back up and rejoining the replica set for validation, may still have oplog entries to apply. This can result in validation being run before a secondary has completed applying operations.
Checking the dbhashes waits for secondaries to have caught up before proceeding. If instead the snippet first checked dbhashes then validated, validating would see all collections in their end state for examining. This ordering would also match how the YAML configuration files order those two hooks.