Why?: The original (Ultimate) Spider-Man died.
Marvel's wild multiverse problems were rectified with their recent Secret Wars mega event, but back in 2011, the Ultimate Universe's Peter Parker ended up getting merked while battling Norman Osborn. While his death ultimately didn't stick (because comic books), that obviously left a void that allowed the half-black, half-Latino Miles Morales to suit up and become the Ultimate Universe's second Spider-Man.
Marvel Editor-in-chief Axel Alonso says that they started discussing having a black Spider-Man a few months prior to Barack Obama becoming president in 2008, and the idea was strengthened by Ultimate Spider-Man scribe Brian Michael Bendis seeing Donald Glover in Spider-Man pajamas on an episode of Community, which was a further call out to the #Donald4SpiderMan campaign.
No matter how you slice it, Morales was a teen who felt like the original Peter Parker, just with a different racial make-up and background. He was bit by a radioactive spider that gave him amazing powers, and through his trials and tribulations, he learned that he needed to use those powers to be an Avenger with great responsibility.