I know a lot of people love emphasizing the impact of the 360's headstart, but I don't think it was the key factor. The 360 got a head start over the Wii too and still got demolished by it for most of last gen. The key was 599 US dollars and a reluctance to give developers a machine that was easy to develop for. The Xbox gained the support of former mostly-PC developers because of its similarities to a PC and the fact that it was made by the people who make Windows. Microsoft made a solid system that was affordable and worked (when it wasnt RRODing) and had great online features which were unmatched by Sony. 599 US dollars caused all the casuals that were around for the PS2 to move to the Wii and the hardcores to go where the dev support was. The decline in quality of Japanese games didn't help Sony either.
Sony fucked up majorly last gen, losing them a lot of their customers, and Microsoft did just well enough to capitalize on it and fill that niche. Microsoft, somehow, managed to do what Sony did last gen, but it wasn't to the same degree of shittiness and they fixed everything really quickly.