If genotype or allele frequencies deviate significantly from HWE, it can indicate Systematic errors in genotyping, Unexpected population structure, Presence of homologous regions in the genome, Association with trait in case-control studies. Since the last of those is least likely, so deviation from HWE is an indicator that a marker should be discarded. It is true unless adjacent markers in LD with one another both violate HWE. You can read more from the article or at the link below:
Genotypic information on SNPs are used to study marker-trait association. Such association is due to linkage disequilibrium (LD) between the genes controlling the trait and the SNPs as well as LD between SNPs themselves. The disequilibrium is due to deviation from the Hardy-Weinberg Equilibrium (HWE). The haplotype frequency of two SNPs deviates from the product of the two individual SNP frequencies. The disequilibrium decays over generations depending upon the linkage parameter between the two genes on the same chromosome. With tight linkage this decay is slowed down and the genes remain together over generations for a long time causing marker-trait association. This is the basis of LD mapping.
You could also have a look at the paper we wrote on how undetected HWD could affect the conclusions of genetic association study papers. Please note that HWD in cases (and not controls) may be indicative of association (also discussed in the paper).
Article The Essentiality of Reporting Hardy-Weinberg Equilibrium Cal...