In the forum post that originally inspired me the original poster wanted to customize the appearance of the search results page.
jQuery is included after the Header Web Template. And guess where the Search Web Template is rendered? That’s right – as part of the header. The name is a bit deceiving – you might think the Search Web Template is used to render the search results, but instead it is used to render the search box that appears in the header.