Being the father of a five-year-old son, my first order of business last weekend was to see the new Lego Batman Movie. (Confession: I would have gone anyway.) Also because of the aforementioned son, I've seen every trailer for this film that's been released over the past year. So I noticed when lines of dialogue in the movie differed from the same scenes in the trailers. This seems, anecdotally, to be something that happens more frequently these days (e.g., the absence of Jyn Erso's "I rebel" line in Rogue One). In most cases, it's probably due to the increasing pressure on studios to make trailers slick mini-movies in their own right that compel audiences to attend.
One edit in particular, though, struck me as having a different explanation. When Lego Batman flies his jet into the Batcave in the trailers, he gives his computer (Siri) the password "na na na na Batman" (to the tune of the 1960's theme song). In the film, however, the password (given not once, but twice, and with gusto) is "Iron Man Sucks!"
That's funny for all sorts of reasons. The DC and Marvel comic book universes are chock full of characters that are basically clones of each other. Batman and Iron Man are the billionaire, playboy, non-superpowered tech wizards of their respective fictional realms, and have a lot more in common than not. Iron Man is the cash cow of the Marvel cinematic universe, so throwing some shade on him was a natural choice.
But why not poke the (iron) bear in the trailers, too?
My hunch: a trademark lawyer somewhere along the line said "no."
To understand why requires a basic understanding of trademark law, and how it differs from copyright. See, copyright protects creative expression, including fictional characters. So, if Iron Man himself had been depicted in Lego Batman, that might have been a copyright problem. (Stressing the "might" here, since it's neither my place nor my intent to express an opinion on whether it might have been fair use or otherwise defensible.) But the character's name, in and of itself, is not copyrightable.
Trademark law, on the other hand, is not about protecting the rights of trademark owners per se. Rather, its purpose is to prevent consumers from being confused as to the source of the goods or services they encounter in the marketplace. Trademarks have historically had a trickier relationship with the First Amendment, because (unlike copyrights) the Constitution does not directly guarantee trademark rights. They arise only out of Congress' ability to regulate commerce. The likelihood of customer confusion, therefore, is always the central factor determining whether someone has infringed a trademark.
That's why filmmakers are almost always safe using a trademark in movie dialogue; they're engaging in creative expression, not selling anything. As it happens, Batman himself reinforced this principle in a case challenging the use of a real trademark to describe a fictional product in The Dark Knight Rises.
Trailers, on the other hand, are advertisements for a movie. It is at least arguable, therefore, that trailers are commercial speech. If DC had used Marvel's IRON MAN® trademark in a trailer, therefore, it's likewise foreseeable that someone might allege that to be confusing to customers and, therefore, infringing. (Again, not expressing any opinion on that--especially since the mark is used in a derogatory manner; just observing that someone might make the claim.) Unlike Batman and Iron Man, trademark lawyers employed by studios do not become heroes by pushing the envelope. Their goal is to avoid getting into unnecessary arguments, even if they might have ultimately won them in court.
Either that, or the person cutting the trailer just liked the Batman song better.