It seems one of the main goals of the island hopping campaign was to gain access to airfields that would put mainland Japan in range of their bombers.
The cost of human life to gain islands like Iwo Jima was staggering. Couldn't they have conducted the raids from western China or even Russia?
The Army Air Corps undertook significant effort to base hundreds of B-29s in China to launch raids of the Japanese home islands and carried out missions there from mid-1944 until January 1945. The operation, appropriately named "Matterhorn," was eventually abandoned because of the tremendous logistical strain required, inadequate range, and eventually, better basing options in the Marianas.
The Soviet Union was a non-starter because it remained a neutral party during the Pacific War until almost its final hours; the Soviets and Japanese signed a non-aggression pact in 1941. The Soviets had no interest in fighting a two-front war in 1943 or 1944, or having their supplies delivered from the United States cut off by Japanese submarines and aircraft.
Meanwhile, FDR had promised Chiang Kai-shek that B-29s would be based in China. Chiang was an important ally, and while there was effort given to deliver supplies to his Chinese forces, he still wanted more support than he was getting (understandable, given that more than a million Japanese soldiers were tied down in China). Japan held a considerable amount of territory in China in 1944, and B-29 bases would have to be constructed safely out of range of Japanese air attacks and beyond the possibility that they might have to be evacuated if an offensive broke through. That created problems even for an aircraft with the prodigious range of the B-29.
Just getting the bombers into the theater was a task: Most B-29s were produced in Washington state or Kansas, with smaller numbers in Nebraska and Atlanta. Ian W. Toll, in "Twilight of the Gods," relays the full route: The aircraft flew cross-country to depart from Florida, landing in the Caribbean, Brazil, Ascension Island in the Atlantic, West Africa, Cairo, Baghdad, Pakistan, and near India. The B-29 is remembered as one of the true wonder weapons of the war and it was a technological marvel, but it had also been fastracked into production and early models arrived with plenty of lingering issues or reliability problems. It wasn't uncommon for aircraft to get stuck in one of these places, sometimes requiring technical experts to fly in and fix the planes to get them going again. After arriving in India, the B-29s had to fly "over the hump" to their bases near Chengdu, China. This wasn't a small feat either; while Allied aircraft had been flying the route into China for years, it was still dicey to take a B-29 over the Himalayan mountains after flying fully halfway around the world. Producing the airfields in China was also a steep task; they required massive runways, and to make sure your formation of bombers could take off at the same time, you needed multiple runways. The famous "North Field" in Tinian eventually had four parallel runways with other runways built elsewhere on the island. The Chinese did this mostly with manual labor rather than the heavy construction equipment that Americans used in the Pacific. As you might expect, construction fell behind and the airfields weren't fully ready when B-29s began arriving. The decision was made to only base the 58th Bomb Wing in Chengdu rather than two bomb wings; the 73rd bomb wing was never sent and eventually operated out of Saipan instead.
The B-29's first combat mission was launched from Kharagpur, India against Japanese targets in Thailand on June 5, 1944, with 98 planes. The 20th Bomber Command there then put together a raid of about 68 B-29s against the Japanese home islands later that month; they departed Kharagapur, staged at Chengu (where fuel had been flown in to refuel the bombers) and went on to Japan. Malfunctions and losses meant that only 47 planes actually reached their target. It was the first time American planes had been over Japan since the Doolittle Raid.
This sounds all well and good, and the Allies made good use of it for propaganda, but the pace of bombing missions was dreadful. The B-29's range allowed it to hit the Japanese home island of Kyushu from these bases but not Tokyo or large swaths elsewhere in Japan. There was no good way to get supplies to the 58th Bomb Wing, and then get it into China. Aviation fuel, bombs, spare parts, everything needed to support thousands of American airmen, it all had to be flown in. The early plans were for the first B-29s arriving to fly in their own supplies, but once they were there, they still had to be sustained. And the more bombers you flew in, the larger your supply chain grew. No military was as successful at overcoming logistical challenges in World War II as the American military, but this was too much to keep up. According to this Air Force Magazine article remembering the efforts, "...in all, 12 round-trip flights over the Hump were required to support one combat sortie." About half of that was fuel. The United States had fuel to burn during the war but it doesn't take an economics degree to understand that this is a poor use of resources.
Meanwhile, at almost the exact same time that the B-29s were carrying out their first raids from India, the invasion of Saipan was beginning. The Marianas Islands, including Saipan and Tinian, were closer to Japan and permitted the bombers to hit Tokyo and most of Honshu. The supply situation was also better; while the Marianas are thousands of miles from the US West Coast, there were plenty of ships available to carry supplies there (sending supplies via sea is far more economical than by air). All around, it was a far better situation than the bases in China.
The invasion of Iwo Jima remains a somewhat contentious decision. However, B-29s generally weren't based at Iwo Jima. It was used primarily as an emergency landing location for B-29s that were suffering mechanical issues, damage, or were low on fuel. It was expected to be used as a base for fighter escorts (to help cut down on B-29 losses) but the switch to nighttime bombing in 1945 mitigated much of the need for fighters. Details on that might be better saved for another question.
SOURCES
"Twilight of the Gods: War in the Western Pacific, 1944-1945" by Ian W. Toll, 2020
"The Matterhorn Missions," by John T. Correll, Air Force Magazine, March 1, 2009