Firms spend their time and money on advertising for the purpose of branding (that is to establish the credibility of their brand), generate traffic and thus boost sales.
To make money and attract their target demographic of customers. Marketing is way more complex than just deciding to post a billboard or create a TV commercial. You want your marketing efforts to help your product appear to people who are most likely to buy it (for example, if you own a vitamin company, it would make more sense to advertise in Men's Health than a magazine about dog care) and to help customers who are seeking your services find you (inbound marketing - for example, listing your business in online business directories so when people Google "Restaurants San Francisco" and click on the Yelp link, your name pops up).
They hope to generate sales
To put their products in front of the buyers.
They hope to generate sales
because they needs customers and from these customers then they later gets money ....
To make money.