Since the ruling actually mentions Warhol using commercial advertisements in his artwork I'm somewhat convinced by their argument.
From the ruling:
In answering this question, we have used the word
“transformative” to describe a copying use that adds something new and important. Campbell, 510 U. S., at 579. An
Cite as: 593 U. S. ____ (2021) 25
Opinion of the Court
“‘artistic painting’” might, for example, fall within the
scope of fair use even though it precisely replicates a copyrighted “‘advertising logo to make a comment about consumerism.’”
IANAL but isn't there a massive difference between an artist making a comment on a totally unrelated field (art world commenting on the business world), and copying a product to use for the same purpose (i.e. a business copying another business's API).
Yes, one of the fair use factors is whether the infringing use is a market substitute. No one is buying a Warhol painting of Campbell soup instead of real Campbell soup.
From the ruling:
In answering this question, we have used the word “transformative” to describe a copying use that adds something new and important. Campbell, 510 U. S., at 579. An Cite as: 593 U. S. ____ (2021) 25 Opinion of the Court “‘artistic painting’” might, for example, fall within the scope of fair use even though it precisely replicates a copyrighted “‘advertising logo to make a comment about consumerism.’”