The first trailer for The Amazing Spider-Man movies came to an underwhelming end, Sony worked with Marvel to create a new Spider-Man franchise that would exist within the Marvel Cinematic Universe.
The relationship between Sony and Marvel with regards to Spider-Man has been a rollercoaster. It includes hacked emails leaked in 2014 showing the budding interest to link Spider-Man and the MCU together, to the eventual licensing agreement in 2015 that allowed the character to appear in new Spider-Man deal was agreed, and it's clear that Sony got the better end of it.
The reason Sony won the deal has to do with the films they are producing outside of the Spider-Man Homecoming trilogy. This starts with the resounding success of 2018's Venom 2 is also rumored to have Tom Holland's Spider-Man cameo as well. This is clearly part of the new Marvel/Sony deal, and means that the former get to have their villain movies exist in the MCU, which has seemed to be a long-term goal.
As well as having their own movies in the MCU - and the boost that comes with that - they also get to have the bump that Holland's Spider-Man being in the MCU offers as well. The MCU is a juggernaut, so their movies being associated with it is a huge advantage. Having Spider-Man: Far From Home, then Morbius and Venom 2 are now must-watch movies for any MCU fan looking to get the entire story, solidifying Sony's power over the MCU in the Spider-Man deal.
When negotiations between Marvel/Disney and Sony broke down, it seemed like a disaster for the MCU given Spider-Man's importance. It was apparent then, and even more so now, that Sony was in the driver's seat, not Disney. The character belonged to them and after Spider-Man: Far From Home, they were confident they have the characters and slate that can carry Spider-Man without any MCU influences. Marvel, on the other hand, just came off of a farewell to Robert Downey Jr. and Chris Evans, leaving an opening for a new lead man for their cinematic universe. Their best-case scenario was Spider-Man filling that gap. What this meant was Marvel needed Spider-Man in the MCU more than Sony needed Spider-Man in the MCU, a large difference from how the standings looked in 2014. In the end, Sony got the best of both worlds, clearly winning the Spider-Man deal.