There are a few reasons. Some ads are placed by the website owner to generate traffic, while others are placed by third-party companies that help the website owner sell products or services. Additionally, some ads are placed by search engines to show users relevant content.