Yeah, it was... complicated. Short version (which, yeah, yeah, you really don't want to know but hey this'll make sure it doesn't circle around and keep you put all night): Pete framed by someone trying to frame me and, well, he had more going for him, so if things couldn't get cleared up, better me in the slammer than him. Aaaaaaand I wasn't blond then, so, easy peasy switch-a-roo.
Oh, and wait, wait, ok, the Scarlet Spider that went nuts and destroying parts of the city and all weird and silvery, that was not me. But that would be why that Spider-man costume change happened right after that.