Military strategy. The main allies we had in the war who had not yet been conquered, that is, Britain and the Soviet Union, were most directly threatened by Hitler, not Japan. So in a concession to them, and to hold the alliance together, we agreed at Casablanca (and earlier at the Arcadia Conference) to fight Hitler first and Japan second.
It also makes practical sense, in that if the Soviet Union or Britain were conquered while we concentrated on Japan, then the alliance would be much less effective sans one member. Japan could be held at bay indefinitely, as they had no way to invade the United States proper. By defeating Hitler first, we would then gain valuable allies (we thought at the time anyway) in defeating Japan once that was done.
While the Japanese struck first, public support behind the war was easier to mobilize with Hitler in the European Theatre. The previous post was quite accurate in the tactical advantage and military alliance forged with the Europeans to go after Hitler first and the Japanese later on in the conflict. The threat that Hitler posed was one where individuals in the position of power were able to mobilize those fighting to focus their efforts. Many felt that Hitler was the motivating force behind the Japanese attacks and posed the greater threat to the notion of "freedom" in the world. In attacking Hitler first, few figured Japan to be a threat to stand on their own. This, and the fact that our allies were facing immediate and pressing challenges from Hitler above all else, made it quite easy for the United States to harness all of their efforts in the European Theatre before the Pacific.