You are in effect asking if this is a case of Fair use, an important US-specific legal concept in copyright law. Please review this question for an overview of fair use. See also This statement from the US copyright office
Deciding whether a use is a fair use is always a fact-driven, case-by-case, process. No one ever knows for sure if a use is a fair use unless that specific use is challenged in court as infringement, and the fair use defense is raised and sustained or not.
Courts evaluate fair use claims on a case-by-case basis, and the outcome of any given case depends on a fact-specific inquiry. This means that there is no formula to ensure that a predetermined percentage or amount of a work—or specific number of words, lines, pages, copies—may be used without permission. ("More Information on Fair Use" -US Copyright office)
Factors
Let's look at the fair-use factors in the case of this photo:
Purpose and character of the use, including whether the use is of a commercial nature or is for nonprofit educational purposes: The use is apparently for clearly commercial purpose. This tends to weigh against fair use, but does not rule it out. Then the is the question of whether the use is transformative. The background image apparently serves its original decorative purpose. Whether making it part of an ad is transformative might be debated.
Nature of the copyrighted work: The graffiti is an artistic and creative work, not a work of non-fiction or news reporting or factual information. This also tends to weigh against fair use.
Amount and substantiality of the portion used in relation to the copyrighted work as a whole: It seems that almost all of the work of graffiti, or at least a significant part of it, is being used. This tends to weigh against fair use to some degree. moreover, the work of graffiti is quite prominent in the background of the work, which ,means it makes a significant contribution to the final work, which also weighs against fair use.
Effect of the use upon the potential market for or value of the copyrighted work: If the work of graffiti is currently being marketed, the question does not say so, and i would suppose that it isn't. There could be a potential market: the artist could make photos or prints of the work and market them, for example. Even so, this image probably wouldn't affect such a market much. This factor probably inclines towards fair use, but it is hard to say just how a court would asses it.
Case law
In Ringgold v. Black Entertainment Television, Inc., 126 F.3d 70 (2d Cir. 1997) A poster of a “church quilt” was used in the background of a television series for 27 seconds. This was held not to be fair use. The court was influenced by the prominence of the poster, its thematic importance for the set decoration of a church, and the fact that it was a conventional practice to license such works for use in television programs. This case seems particularly close to the one in the question.
In Bill Graham Archives v. Dorling Kindersley Ltd. 448 F.3d 605 (2d Cir. 2006) posters of Grateful Dead concerts were reproduced in a book. This was held to be fair use. The reduced size of the images, and their appearance in the context of a timeline were considered significant.
In Kienitz v. Sconnie Nation LLC, 766 F.3d 756 (7th Cir. 2014) A modified photo of a Wisconsin mayor was reproduced on a Tshirt and used to raise money for an event. the photo was posterized, background removed, text added, and a lime green outline featuring the mayor’s smile remained. The resulting image of the mayor, the court stated, “can’t be copyrighted.”
Defendants removed so much of the original that, as with the Cheshire Cat, only the smile remains. Defendants started with a low-resolution version posted on the City’s website, so much of
the original’s detail never had a chance to reach the copy; the original’s background is gone; its colors and shading are gone; the expression in Soglin’s eyes can no longer be read; after the posterization (and reproduction by silk-screening),
the effect of the lighting in the original is almost extinguished. What is left, besides a hint of Soglin’s smile, is the outline of his face, which can’t be copyrighted.
(I take this to mean that the elements actually copied do not have enough original content to be a copyrightable wqrk.)
- In Kelly v. Arriba-Soft, 336 F.3d. 811 (9th Cir. 2003) use of thumbnail images in search engine results was held to be fair use. The reduced size and image quality were significant to the court. So was the transformative use of the images to help identify and index the pages.
Conclusion
This is not a clear-cut case, in my view, but the case for fair use does not seem strong to me.
Copyright protection of Unauthorized Graffiti
A number of comments and some other answers have raised the question of whether graffiti made without the permission of the owner or tenant of the location, and therefore illegally, are entitled to copyright protection.
The first thing to say is that there is nothing in 17 USC (the US copyright law) that conditions copyright protection on the legality of the work, or of its publication.
Case law on this precise issue is not easy to find, nor does there seem to be much of it.
IPWatchDog's "Preventing a Graffiti Copyright Infringement Lawsuit" (2018) says:
Several high-profile companies, American Apparel, Coach, American Eagle Outfitters and H&M who shot advertisements in public spaces, have found themselves inadvertently in the midst of such legal disputes with street artists. Even though an advertiser may have had permission from the property owners, even though the “artwork” was unsanctioned and unsigned or “tagged,” the graffiti artists have come forward after the ads were already in circulation, identified themselves and sought compensation and damages.
It goes on to say that:
These cases tend to be settled out of court, because regardless of the merit of an infringement claim, they are costly to defend and the unwarranted negative publicity can injure a company’s reputation. ... Also, from a legal standpoint, the question of whether the copyrights of illegally created street art are valid has not yet been determined – so there would be some element of doubt as to how a litigation would be decided.
*The Atlantic's article "Can Graffiti Be Copyrighted?" about the case of graffiti artist David Anasagasti's case against American Eagle Outfitters for use of his work (and several other similar suits) quotes Philippa Loengard, assistant director of Columbia Law School’s Kernochan Center for Law, Media, and the Arts as saying:
Given what I know of the case, this is one of the most blatant examples of copyright infringement
None of the suits mentioned in the story seem to have resulted in a court decision as yet.
In Falkner v. General Motors Company, the trial judge held that the art was not "part of" the building and thus the exemption for photos of architectural works under 17 USC 120 does not apply. However it denied plaintiff’s DMCA claim and his claim for punitive damages.
The court held that:
because the facts in the record tend to establish—if anything—the lack of a relevant connection between the mural and the parking garage, the Court cannot hold as a matter of law that the mural is part of an architectural work under Section 102(a)(8). Thus, it cannot reach the issue of whether Section 120(a) applies to the mural to permit photographs of the mural.
In an article in the N.Y.U. Journal of IP & Entertainment Law "Protecting Artistic Vandalism" author Celia Lerman argues that copyright should protect unauthorized, illegal graffiti art.
This article notes that:
Graffiti pieces increasingly attract the attention of numerous collectors, gallery owners, publishers, filmmakers, and journalists. Pieces from famous graffiti artists have sold for hundreds of thousands of dollars in the art market. Graffiti pieces have even been given as diplomatic gifts. Galleries are seeing record attendance at exhibitions of graffiti works, and publishers have generated a boom of photographic books on graffiti and street art. (citations omitted)
The article notes that Tattooed Walls a book by Peter Rosenstein about NYC Graffiti, reproduced images of many works of graffiti without permisison, the author believed that these were fair use because they were posted in public places. Several artist sued, a settlement was agreed to, and the book was withdrawn from publication.
The article mentions a suit against Tony Hawk’s Pro Skater 2 Official Strategy Guide, by the author of a work of graffiti which was reproduced. The suit was initially dismissed for lack of copyright registration, but the court said that it “assumed, without deciding, that the work is copyrightable.” When the suit was refiled after registration, a motion to dismiss was denied, and the parties then settled, so there was no court decision on the merits.
Other simialtr cases are mentioned. The article goes on to analyze the law and the purposes that copyright law serves, and give reasons why such works should be protected. But none of this cites an actual case where an illegal graffito has been held protected.
The Falkner case will not produce such a ruling, because the art in that case was authorized, indeed invited, by the building owner.