If you have a blog, an eCommerce site, or a myriad of pages, a site search may be useful in helping your visitors navigate your website in just a few clicks. A search bar allows your users to find what they are looking for quickly.
Search results can also be integrated into your Google Analytics. You will be able to see how often people search for a particular term.
All in all, a search function can provide a useful tool for both your visitors and you.