Not long ago, the advertising business was headed toward pariah status. Ad-free streaming services like Netflix were booming and ad blockers for the web were thriving. It seemed like people were ready to tune out ads completely.

“The way we know advertising today is dead,” warned Mastercard Chief Marketing Officer Raja Rajamannar during the ad industry’s annual festival in Cannes, France, in 2019. Citing ad blockers and consumers migrating to ad-free environments, he urged fellow marketers to find new ways to reach consumers. “It’s imperative that we need to have alternative ways of showing up and generating brand awareness.”

What a difference a few years make.

Virtually every major streamer, from Netflix to Disney+, has launched a service tier that includes ads. They are joined by an exhaustive list of corporations—many of whom are far afield from media—that are plotting or have started ad-sales businesses.

United Airlines is the latest company to consider expanding its ad business by using passenger information to help brands serve targeted ads to its customers, The Wall Street Journal reported last week.

Everything is an ad network

If the airline follows through with its latest venture, it would be joining a growing number of companies working to cram even more ads into every nanosecond of people’s lives—a list that includes retailers, streaming services, hotels and delivery apps.

This new market dynamic even has its own slogan: “Everything is an Ad Network,” a catchphrase coined by mobile-marketing guru Eric Seufert.

“Attention is the new oil well of money making, so companies are creating more and more attention mediums,” said ad-industry veteran Tim Armstrong, a former Google executive and AOL chief executive who now leads Flowcode, a direct-to-consumer platform company. “It’s easy money.”

Companies are embracing advertising for a variety of reasons. For some, it is a straightforward way to generate more revenue. Others, like streamers, have found that including ads gives them a chance to offer their service at a discount and reach new, price-conscious customers. Major retailers, meanwhile, have seen how rival Amazon.com managed to build a massive advertising business, and are trying to carve out their own share of the lucrative market.

Many were also emboldened by the big void left in the wake of Apple’s changes to its privacy policy in 2021 that required apps to ask users if they want to be tracked. That move dented the ability of some tech platforms such as Facebook to prove the effectiveness of their ads. Companies, especially retailers, seized the moment by leveraging the shopper data they amassed, which is a critical component of online ad targeting and measurement.

Turning in-store TVs into billboards

Best Buy and Walmart have built advertising businesses that let brands buy ads on multiple platforms—including the TVs in their stores, which have been turned into ad-delivery devices. Walmart also sells ads that appear on screens in self-checkout lanes and commercials that blare over the radio in its stores. Both Best Buy and Walmart also leverage shopper data to allow advertisers to better target their customers on their respective sites and elsewhere on the web.

Uber Technologies sells ads on its ride-hailing app as well as its food and alcohol-delivery services, Uber Eats and Drizly. Once users book a ride, a video ad plays while they wait for the driver to arrive. Some Uber vehicles even have small digital billboards affixed on their roofs, on which ads are displayed.

Marriott lets advertisers target its loyalty members—who have opted in—with ads that appear in their email inboxes or on the Marriott Bonvoy app. Next year, the hotel chain will allow brands to buy ads that will appear on in-room TV sets.

Streaming services, some of which were hellbent on not cluttering their programming with advertising, have also found religion when it comes to ads after their subscriber growth started to stagnate. Netflix made a U-turn last year by introducing an ad-supported tier of service, an option now offered by seemingly every major streaming platform. Starting next year, Amazon will serve ads to all its U.S. Prime Video users and charge an extra $2.99 a month to subscribers who want to avoid ads.

In an effort to drive more users toward their ad-supported platforms, most streaming services have raised the price of their ad-free tiers sharply over the past year, but kept the cost of their ad-backed offerings stable, to a point where the ad-free version is often twice as expensive as the ad-supported alternative. The trade-off makes sense: Several streamers have said they generate more money per user from their ad-supported service.

Advertising can be more profitable than the main line of business of the companies looking to bulk up their ad offerings.

Walmart, for example, gets the majority of its U.S. revenue from its lower-margin grocery business and is leaning into advertising partly because margins are so high. “I can’t remember a business with the margin structure of the advertising business here at Walmart,” CEO Doug McMillon said last year. The retailer said its global advertising business grew nearly 30% to $2.7 billion in its last fiscal year.

Retailers that offer advertising services are attractive to advertisers because they often sell the products that are being advertised, making it easier to prove that an ad actually led to a sale.

What is called “retail media” is projected to yield $46.4 billion in U.S. ad revenue this year, almost a 50% increase from two years ago, according to Insider Intelligence.

The risk of ad blindness

In an interview, Mastercard’s Rajamannar said he stood by his 2019 comments.

“The way we are doing advertising today has to undergo a dramatic reinvention and transformation because consumers are fundamentally telling you ‘I’m annoyed with your ads, you’re cutting into my space and interrupting my experience,’” he said. “That is not a sustainable model.”

Mastercard has shifted a significant portion of its ad budget out of traditional advertising and into experiences such as sponsoring live events, Rajamannar said.

Over the past year, YouGov, a U.K.-based market-research company, asked almost 80,000 U.S. adults whether they felt bombarded by advertising. About 70% said they do.

“In a world where every site or app is an advertising opportunity regardless of the intended purpose for the consumer, you eventually have a problem with ad blindness,” said Kelly Metz, chief investment officer at ad-buying firm OMD. Companies are “putting ads in places where consumers are on task, like buying their groceries, and there is no good way for the human brain to process all that information.”

Armstrong, the Flowcode CEO, added: “The big question is: ‘How many ads is a human willing to tolerate every day of their lives?’”

Write to Suzanne Vranica at Suzanne.Vranica@wsj.com