At McLaren he didnt know what he was getting into - ie. he thought he was racing with a rookie; by the middle of the season, Alonso wouldve thought that he would be the only contender for the title and automatically would get No.1 status (ie. if Hamilton is leading a race, he would be asked to pull over, in order to ensure McLaren win the drivers title, bearing in mind that Hamilton is too far behind at this stage to win the title himself). It was almost like a forgone conclusion that this would happen. It would not be unreasonable for Alonso to be thinking along these lines. Unfortunately for Alonso, Hamilton had the best season of any rookie in F1, which created a lot of animosity.
At Ferrari, he would go in knowing that he would have a battle on his hands. He wont have to reset his mindset in the middle of the season and change how he treats his team mate.
Big difference.
This is why I honestly believe that it was Alonso's mindset when Hamilton turned out to be a genuine contender, that prevented Alonso from winning the WDC. I feel Alonso beat Alonso, not Ferrari or Hamilton. Had he stayed with McLaren next year, I'm sure he wouldve scored many points than Hamilton, as by then he wouldve been comfortable in the team and would know how things work (off the track and on it).