Sony released their first three Spider-Man movies between 2002 and 2007, and already had a 4th & 5th Spider-Man in the works.
After the success of the Avengers franchise released by Marvel Studios, beginning with Iron Man in 2008, there was suddenly a lot of interest in Marvel property. Sony tried to push the Spider-Man franchise to be bigger and better in order to benefit from the renewed interest in superhero movies, and tried to rush the production.
This caused the director (Sam Raimi) to pull out of creating more, as he didn't want to complete it to their timeline and other creative differences (casting choices, doing it in 3d).
This forced Sony to do a reboot with Marc Webb and Andrew Garfield with The Amazing Spider-Man. This was supposed to kick off its own franchise with the emergence of Spider-Man villains The Sinister Six, but the movies failed to impress.
Due to their attempts at rebooting the franchise failing and Marvel's going on to have such success, Sony struck up a deal with Marvel. Marvel would be allowed to use Spider-Man in their other Avengers movies, whilst in exchange they would help Sony creatively in writing new Spider-Man movies.
One of the conditions that Marvel required for this deal was to recast the actor for Spider-Man (not sure about the director), which meant that for further films the continuity would not hold, hence them again rebooting the franchise.
Whether these new films will again have an origin story is uncertain so far, or if they will begin at a time when Spider-Man already has his powers.
If the question is why they are rebooting Spider-Man so soon after the previous attempts, Roger's answer is correct, if no more movies are made in a set time frame the rights to Spider-Man reverts back to Marvel.