Bad coding can affect your site very badly. The website's pages are crawled by search enignes bots to get indexed. Mentioned above previously before, bots only take a what your code says. The analyze the website code and in case they found any errors in the code your entire website