No matter how much glitz and glamor you throw at it, when you come right down to it, filmmaking is a business. Sure, the director may be in it to properly express her/his creative vision, the writer may be in it to have their voice be heard, or the actor may be in it to embody the human experience in an entirely revolutionary fashion. But studios? They're in it for the money.
They are a stone-cold business, funding various projects and looking for returns. The money has to work out so that the studio can continue to fund films so that the artists can continue to create them and so on and so forth. Thus, an exceedingly necessary part of the filmmaking process is the marketing campaign.
Back in the good old days, films would just hit the theatres and audiences would flock to them simply because they were films and people were starved for entertainment. But fast forward a century or two, and there's a handful of films hitting the box office each week.
In order to get butts in the seats, studios go all in on marketing. The posters, the trailers, the pre-release press announcements; they do it all. But sometimes, marketing can act as a hindrance to a film rather than a help. Whether through spoiling key moments, misrepresenting the film, or setting up false expectations, marketing can do serious damage to a film and the way it is received.