Why did flying boats in the '30s and '40s have a longer range than land based aircraft?
Since fuel volume in aircraft is a large factor in range, and the volume of an aircraft increases faster than the linear size, larger aircraft have a big advantage for range. In the 1930s, the biggest hurdle for large land-based aircraft was infrastructure. Most airports in the 1930s were not very large, and many parts of the world did not have any at all. The common airliners at the time carried around 20 passengers.
Designing an aircraft that could land on the water allowed aircraft to get larger and have longer ranges without the need for large runways to be built to support them. Aircraft like the Sikorsky S-42 carried almost 40 passengers. It wasn't until at least the late 1930s that land based aircraft were able to reach this size, and after World War II the devolopment of infrastructure and aircraft technology made long-range land-based aircraft much more feasible.