The reason was probably one of many. I think MS sent out a load of consoles to hip celebs. But also 360 was out a year before PS3 and so had sold ~3m by the time is was released. A year later 360 had roughly a 3:1 advantage.
The year-early launch mattered, but it wouldn't be the first thing I would cite. Not a lot of people wanted to buy PS3 at $599 (and portion of those wanted it just to play BluRays), games looked/performed worse on it and Xbox Live was a much better way to play multiplayer games with your friends for quite a while. In fact, Xbox Live was probably the biggest single reason for the 360's sales success. They nailed that aspect of the system right from the start.
The Xbox sold well because it was a good product that was marketed well. The biggest challenge it faced was the manufacturing/design issues that led to the hardware failures and MS dealt with that about as well as they could. It's remarkable that even when people were well aware of these problems, they continued to buy them anyway. It speaks to how appealing the product was that people were willing to overlook this even once they knew that they would likely, at some point, have to go through the inconvenience of going through the warranty repair process.