Why is it required to do ANOVA before doing Tukey's HSD?


Hello People,
I’m doing the inferential statistics course in Udacity. My understanding is that ANOVA is conducted to check if a number of samples are far away from the each other and Tukey’s HSD is to see if any two samples from the bunch are far away from each other. The Udacity course says ANOVA is required to be done before Tukey’s HSD. Why’s that?