Iwo was brimming caves and places for the Jap defenders to hide. Think of them as "natural bunkers". A sniper could pop out of a hole in the cave, fire off a few rounds, then go back in and hide. This was one of the many factors that impacted the number of American casualties. These caves had countless places the enemy could pop in and out of. This is where the use of the flamethrower came in.
The terrain on Iwo Jima wasn't the only reason that American casualties were extremely high. Approximately one-third of all Marines killed in action in World War II were killed at Iwo Jima, making Iwo Jima the battle with the highest number of casualties in Marine Corps history. The Japanese defenders just weren't willing to give up Iwo. Why do you ask? Because Iwo Jima was considered to be part of Japan. It was their homeland. If someone invaded your home, I'm guessing you wouldn't just surrender it either. The Japanese fought to the death on every other island on the Pacific and Iwo Jima wasn't an exception.