I've seen this claimed by multiple historians, but never really explained why. It's particularly confusing to me since it was Japan that attacked the U.S., not Germany.
The "Europe First" strategy was actually decided before the attack on Pearl Harbor. This is a big, broad issue; long essays, theses, dissertations, even books have examined the strategy and issues that factored into it. With all that in mind, please understand that a Reddit answer is really only going to scratch the surface of this. Hopefully some other contributors can also provide more context. The one-sentence summary is that the American and British political leadership determined that Germany was a much greater threat to the Allies than Japan could be. Historians have overwhelmingly affirmed this view.
The long answer: The Germans had the economic, technological, and military power to present an existential threat to Britain or the Soviet Union. The foundations of the "Europe First" strategy were laid before Germany invaded the Soviet Union, but there were real concerns about the capacity of the German military to lay waste to Britain (especially in 1940) and the Soviet Union (in the early days of Barbarossa). Both Britain and the Soviets needed to keep fighting; losing either one either to defeat or a separate peace would allow the Germans to focus more fully on a single front. The Japanese, by contrast, could not strike at the direct interests of the United States or Britain. The Philippines were a valuable US territory and Britain's link to its colonies in India, Asia, and elsewhere in the Pacific, but losing these territories wouldn't mean losing the war. At the risk of oversimplifying, you can put the reasoning for the Europe-first strategic into three general baskets.
First, and what I would argue was more important, was the economics. Germany had become one of the world's largest economies by the late 1930s and early 1940s 1 and it continued to increase its warmaking capacity while acquiring territory and resources in Europe both before and during the war. Japan was no slouch, but as the table there shows, its GDP was more comparable to that of Italy than Germany. The Japanese economy was also more or less running at maximum warmaking capacity by 1941; the war in China had been in full swing since 1937, and Japan's military had been fighting in China in some form or fashion for a decade by then. Anthony Tully has a more in-depth breakdown of the US economy and warmaking capacity compared to the Japanese economy here 2.
Part of the economic strength of Germany came from its technological prowess. As Ian Toll describes in Pacific Crucible [3], Germany was deemed more like to be able to develop "new and fearsome weapons of mass destruction." The Allies may have underrated Japanese technology before the war began, but the Germans did indeed develop weapons that were more advanced than anything the Japanese fielded, including jet aircraft, guided missiles, and advanced diesel-electric submarines, to name just a few.
Before the German invasion of the Soviet Union, there would have been concerns of the world being divided up into "spheres of influence," where the Germans and Italians dominated Europe and North Africa, the Japanese came to be dominant in Asia, and the Soviet Union remained mostly self-contained as a communist power. A situation like this would have allowed the US to remain in a strong position in the Americas, but would have forced it to choose between economic isolationism or to trade with the fascist governments in Europe, the militarists in Japan, or the communists. This would have only strengthened the Axis powers. None of those options seemed particularly appealing to the United States, which preferred to maintain free trade with democratic governments and capitalist economies. After the invasion of the Soviet Union, there were concerns about whether Germany could become too powerful on the European continent to be defeated unless it was made to fight on several fronts.
This brings us to geography, the second reason. The US, Britain, and Russia could all fight the Germans, while only the US could fight the Japanese in any significant way. Dwight Eisenhower discusses the idea of forcing Germany to fight on several fronts in his book, "Crusade in Europe"4. Quoting at length here:
Stated in simple form, the basic reasons for first attacking the European members of the Axis were:
The European Axis was the only one of our two separated enemies that could be attacked simultaneously by the three powerful members of the Allied nations, Russia, Great Britain, and the United States. The United States was the only one of the coalition free to choose which of its enemies to attack first. But if we should decide to go full out immediately against Japan, we would leave the Allies divided, with two members risking defeat, or at the best, struggling indecisively against the great European fortress. Meanwhile America, carrying the war alone to Japan, would always be faced with the necessity, after a Pacific victory, of undertaking the conquest of Hitler's empire with prostrated or badly weakened Allies. Further, and vitally important, it was not known at that time how long Russia could hold out against the repeated attacks of the Wehrmact. No effort against Japan could possibly help Russia stay in the war. The only way aid could be give that country, aside from shipping her supplies, was by engaging in the European conflict in the most effective way possible. Finally, the defeat of the European Axis would liberate British forces to apply against Japan.
As far as I know, the wisdom of the plan to turn the weight of our power against the European enemy before attempting an all-out campaign against Japan has never been questioned by any real student of strategy.
Third, there were ideological reasons to support Europe first. Most Americans felt much more significant cultural or personal ties to Europe, and it also made sense to support the countries which had been democratic in their war against fascism. This would not have been the case in many areas of Asia, notably in China or in the myriad colonies of France, the Netherlands, and Britain in the Indo-Pacific. World War II, of course, eventually led to many European powers losing their grip on many of their Pacific colonies in the aftermath; the US was willing to fight the Japanese but not especially interested in upholding the colonial system, among its many priorities. The Nazi sweep across Europe was seen as a threat to the American way of life in the way that Japan never was. This is reflected in Franklin Roosevelt's 1941 State of the Union 5, called the "Four Freedoms" Speech:
I suppose that every realist knows that the democratic way of life is at this moment being directly assailed in every part of the world–assailed either by arms, or by secret spreading of poisonous propaganda by those who seek to destroy unity and promote discord in nations that are still at peace.
During sixteen long months this assault has blotted out the whole pattern of democratic life in an appalling number of independent nations, great and small. And the assailants are still on the march, threatening other nations, great and small.
Whether this plays a role in developing the actual military strategy can be debated. However, in a democracy, the leaders need the support of the people, and this was one of the reasons that was publicly used for justifying the attention and resources devoted to Europe. In the 1942 State of the Union Roosevelt made the case again. These speeches are just easy examples to find: 6
But the dreams of empire of the Japanese and Fascist leaders were modest in comparison with the gargantuan aspirations of Hitler and his Nazis. Even before they came to power in 1933, their plans for that conquest had been drawn. Those plans provided for ultimate domination, not of any one section of the world, but of the whole earth and all the oceans on it.
1/2