Where did they get the resources or the technology to face one of the biggest armies in the world?
Follow up: how much of a role did the geography of Japan (isolated archipelago of thousands of islands, mountainous, etc) contribute to the difficult experience of the US in trying to subdue to Japanese forces?
Manchuria was invaded in early 1930's for acquiring Japan's resources. Japan had a choice by 1941 to either submit to US and international sanctions (they walked out if the League of Nations in protest), or expand hostilities to acquire more resources in Indonesia (rubber and tin) and Dutch East Indies (oil) It was a viscous cycle of always needing to expand to have resources for industry and machines of war. They envisioned taking over South East Asia from the western colonial powers of Britain, France, Netherlands, and the United States to acquire there resources.
Refer to Hirohito and the Making of Modern Japan by Herbert P. Bix, the 2001 Pulitzer Prize winner for General Non-Fiction
Keep in mind the Japanese perspective also, following how the US and British regarding Japan as far back as WW1 when Japan was their Ally in War against Germany:
"I would point out that Japan's proposal at the Versailles Peace Conference on the principle of racial equality was rejected by delegates such as those from Britain and the United States"
Like Germany, however, Japan counted on a quick and decisive victory, and was unprepared for a protracted war of attrition. Also like Hitler, Japan’s leaders sorely underestimated its enemies’ resilience and tenacity and no more so than in the case of Japan’s primary enemy, the US. Admiral Isoroku Yamamoto, Commander in Chief of the Combined Fleet (who had spent some time in the US seeing the oil fields of Texas and Industrial might of the mid-west) believed that Japan’s only chance for success was to cripple the US Pacific Fleet and establish an island defensive barrier that would deter the Americans from a costly assault and force them to a negotiated peace. Otherwise he believed he had 6–12 months during which Japan could run amok but after that its prospects for continued success would dim. And Japan did, indeed, enjoy stunning success, humbling a British and Commonwealth army in Malaya and Singapore, conquering the Dutch East Indies and taking the Philippines in one if the largest US surrenders (Douglas MacArthur was so awe struck he didn't issue orders to his commanders when they pleaded with him, for days after the invasion of the Philippines. US aircraft were even lined up on Clark field ready for destruction, never on alert, even after knowing about Pearl Harbour being attacked!).
Japan was looking to establish a Pacific island defensive system that was, indeed, impressively formidable. They knew they would lose territory but thought they could regain control of the majority of what they took following a War. Much like what western powers had done to claim this territory centuries earlier.
To just fight the US across the vast swaths of the Pacific you don't need a huge army, and it should be noted that until the last 12 months of the war the majority of the IJA was deployed on the Asian mainland. The war against America was a naval fight led by and large by the IJN.
And Japan had spent the best part of 50 years on a committed path to becoming a first rate naval power. Britain had also taken upon itself to sponsor much of this growth and as part of the Anglo-Japanese Alliance the IJN bought multiple warships and designs from Britain and patterned itself as a force on the Royal Navy. Some the Japan's most famous warships such as the Mikasa and Kongo emerged from British yards.
Thus with a nascent fleet of modern dreadnoughts and an ambitious 8-8 plan the Japanese emerged from WW1 with the 3rd largest navy behind the US and UK. And a govt whose policy increasingly placed it at odds with Western states. This also didnt slow down in the years after the war, and a first rate navy was made a matter of national pride. Public subscriptions, scrap drives, and savings drives helped fund new ships. But international pressure led to their acceptance of the Washington Naval Treaty in the early 20's. This functionally limited them to a 5-5-3 ratio in capital ships to the UK and US. Leading to the scrapping of some of those ships so much had been invested in like Tosa, while others like Akagi and Kaga were converted to carriers.
Japan then set upon a policy of focusing on offensive strength in each design, to the point of dangerously over building several designs and putting every weapon they could. While adopting a very aggressive doctrine based on lightening night attacks by light ships and a dawn finishing blow by the big guns with the carriers assisting and raiding. While in response to further negotiations and the attempt to set up a follow on London Naval Treaty in the mid 30's Japan walks out the door. They had set up some classes to violate terms of the treaty even before, and by the late 30's were in full on expansion mode. Backed by visionary leadership the IJN entered the war with a strong temporary advantage in areas. Key above all was a very high quality, if fragile, naval aviation force, with numerous well drilled carriers and aviators that allowed them to punch above their weight. While her foes in the US and UK were hamstrung by the needs of a 2 ocean war, and either threat much closer to home or slower mobilization.
But once the yards and factories of the US have a chance to get into the swing of things its a non stop slide into a tidal wave. The US built more Essex class fleet carriers than Japan built Fleet and Light carriers of all types combined.