Besides being able to throw Spidey in for cameo purposes, mainly to spur excitement and, as others have explained above, sell more stuff, I can only think of one main way that this deal helps Marvel, and that is stories like the Secret Wars!!!!!
Think about it...
Secret Wars is the next logical step for the Marvel cinematic universe after the events of the Infinity Wars. It's a major Marvel event, making it a perfect story to adapt (with, of course, certain tweeks).
Yes they could have done the Secret Wars with the characters they have the rights to, but Spidey was a pretty important character in Secret Wars. Same could be said for other non-Marvel-owned characters, such as the F4, Doom and the X-Men; but Spidey would be a great character to add, and who knows what they might work out with Fox between now and then...
From the hero side of things Marvel is standing pretty well. They already have Captain America, Thor, Hawkeye and Iron Man; all of whom were in the original 1983 story. In addition, they own the rights to other characters that may not have been seen in the movies yet, but could be between now and when a Secret Wars movie comes out. These would include She-Hulk, Captain Marvel and Wasp.
From the villain side Marvel isn't doing great as far as this story. Not one of the villains used in the Secret Wars story is available at this time, as far as already being introduced, and many are currently off the table. Enchantress is a possibility, Ultron (depending on his outcome - though I have a feeling he'll be done post Avengers Ultron), Kang (if he's ever introduced), the Wrecking Crew (right?), and Molecule Man. The ones off the table are Doctor Doom, Galactus or Magneto (I know - he was officially on the good side).
But with this Spiderman deal I would imagine that Spiderman and Doc Ock are usable, and that's huge.
And of course they can add other characters, such as other Avengers, Guardians, Black Cat (I would imagine), etc.
The point is that a Secret Wars story, of course altered, is not oly very feasible, but a very likely place to head to after whatever phase they have plans for (what is it now, Phase 4? - making this phase 5???).
Are there any other major Marvel stories that include the Avengers and other Marvel owned movie characters, as well as Spiderman et al???