Check out the Wikipedia article The Avengers (2012 film) - Wikipedia, the free encyclopedia , This is one of those really twisted license/ownership things I always go on about.
In 2005, Marvel Studios “declared” its independence (I guess from any outside ownership). Then there’s a five film deal for Paramount to distribute Marvel Studios’ films. In 2010, Disney paid Paramount $115 million for worldwide distribution rights while Paramount gets to keep their 8 percent box office fee it would have earned for distributing the film and placement of the company’s logo on marketing materials. As a result, the onscreen production credit reads “Marvel Studios in association with Paramount Pictures” though the film is owned, distributed and marketed by Disney.
It’s a mess and that’s why they pay lawyers millions of dollars a year on retainer fees.