The revelation, first reported in early February by The Times of London , led media buying agency Havas to pull all its YouTube and Google Digital Network ads in the U.K. Johnson & Johnson , JPMorgan , AT&T and Verizon , among others, have suspended or pulled advertising with Google as well.

Google is under fire after several ads were seen running next to offensive content in the U.K. — including neo-Nazi and jihadist videos — on YouTube and other websites it serves ads on.

Say that media buyers decide YouTube is the best place. Here are the main ways they could buy an ad there:

To better understand how these ads wind up next to offensive content, it helps to understand how companies buy ads online.

On the other hand, a media buyer could decide that a simple display ad is better. Display ads are text, image or video ads that appear on websites, essentially the online equivalent of print ads. Google is one of the biggest companies that "serves" online ads, meaning it owns technology that places ads on websites.

In the old days, if a brand wanted to reach a certain demographic, media buyers would turn to a TV channel that they knew had a high number of viewers in that group, said Mikkel If Hansen, partner and product owner at media analytics platform Blackwood Seven. The company uses artificial intelligence and machine learning to help brands make more efficient ad buys.

But those ads would appear to anybody watching the TV channel, including people outside the desired demographic. Advertisers, in a sense, overpaid to reach their desired audience.

Digital platforms allow brands to target only the people they want. If people are logged into their Google accounts and have entered their personal information, the company can tell their age, gender, and location data, among other aspects like search history and websites they visit.

Though digital ads are more targeted and can reach more people than TV commercials, Google and other ad tech companies use computer programs rather than people to decide where to place ads, because media buyers are purchasing type of person not a specific website. It also means no one knows all the instances the ad appeared.

"It's difficult for them to see what they bought because you are buying behavior and not actual placements," Hansen said.

In addition, technology isn't quite good enough yet to block objectionable content instantaneously. Google can block websites tagged with offensive words, but it's harder to "see" what the videos are about, said Borchard. About 400 minutes of video is uploaded to YouTube every minute.

"The sheer amount of video that is being uploaded to YouTube is mindboggling," Borchard said.

In short, there's far too much content online to scan and immediately remove if deemed offensive. Companies still rely on people to tag bad content that may have slipped through their sensors. Plus, there are potential legal issues that prevent blocking content.

In a blog post on Monday, Google's chief business officer Philipp Schindler apologized for the ad adjacency issues, and said the company is working to make sure that ads only show up next to creators the company can vouch for, and make it easier for advertisers to control which kinds of content their ads appear next to. Schindler also said the company will share more about where ads run, as well as act faster to take down questionable videos.