All movies are made with profit in mind. Otherwise filmmakers couldn't continue to make films. Every artist knows that while art for art's sake is ideal, art for the sake of paying bills is an inescapable reality as well.
But Marvel knows that in order to really sell their stories, those stories have to be genuine, to have a lot of thought and effort put into every aspect of them, from the grandest plot twist to the smallest costume detail. Marvel's writers and directors take care to craft compelling stories, and the actors take them seriously when bringing them to life. These movies make money precisely because the stories they tell are so good.