The first search engine, Wandex, was developed in 1993. As soon as search engines became more common, webmasters learned to appreciate the traffic sent to them by search engines. They began submitting their sites on a regular basis, and soon figured out that they could tweak their sites to achieve better ranking in search results.
Then, the search engine optimization (SEO) consultants attempted to decipher the algorithms used by the search engines. The goal was to establish code and design characteristics that ultimately would increase a site's exposure.
Studies have shown that most users do not look beyond the first 20 or so results when performing a web search. Therefore, a higher ranking in those results translates to more visitors to your site.