>This was mainly an issue with technology. <
During WW2 the Japanese armies were armed with was is known as the Arisaka-family bolt action rifle. Bolt action rifles generally have good amounts of limitations in combat, mainly because you can only shoot once before having to load another bullet into the chamber.
While the Japanese were armed with these, they were going up against something pretty hardcore. U.S infantry having more modernized weaponry than the Japanese-The U.S. armies were armed with the semi-automatic M1 grand.
Another factor that caused mass casualties for the Japanese was Firebombing.
The U.S. aircraft would literally burn entire areas-ashes to ground. During the U.S. campaigns, the most effective happened to be a firebombing on Tokyo-It was a part of the Operation Meetinghouse.
The Japanese government also issued suicide attacks.
The Japanese government created these culture encouraging suicide attacks, opposed to surrendering. It was to show as a part of having an honorable samurai death.
The Banzai charges had mixed ratios of effectiveness. Some were able to overwhelm small enemies, but they suffered mass casualties when attacking larger, superior forces.