There are different kinds of advertising:
On the internet you often have "Buy OUR crap. Now." ads which hope people click on them and buy stuff. But for the reasons you stated, most ads outside of search engines won't lead to direct sales that way because people rarely come to websites like Facebook looking to buy stuff *right now*.
Another kind of ad are more about brand recognition, about getting your name out. So that people who aren't looking to buy something *right now* will either remember your name or at least recognize it again on a more subtle level.
I mean, it's not like a company putting an ad for a lawn mower in a magazine or airing one during the Super Bowl expects people to jump up and run out to buy a lawn mower right after they see it (i.e. offline they usually don't expect the equivalent of a click-through leading to a sale when someone views their ad).
BUT: the next time you need to buy a lawn mower, you might remember their name and make sure to look at their products before coming to a decision what to buy.
Or, if you are in the store in front of a line of lawn mowers and have to make a decision between a few models which are similar on features and price, a lot of people won't toss a coin, they'll often - maybe just subconsciously - favor the manufacturer whose name rings a faint bell over ones they've never heard of before.
This probably becomes more important the cheaper and harder to distinguish the products are.
When buying a car, there's lots of stuff you can look up to compare or have preferences for.
When standing in front of a wall of unknown toilet cleaners with tiny price difference and your usual one [ how did it become your usual..?] is out of stock, name recognition or the design of the bottle might influence how "randomly" you select one of the other options.
And if your random(?) pick works for you, it might become your new usual product.