I don’t know if I can give a “factual answer”, but I can make a WAG based on my opinion.
In 1957-1958 we had the “International Geophysical Year”, a period in which scientists all over the world studied our planet. Jacques Cousteau got Calypso in 1950. We’re all familiar with his Undersea World shows; but he and his crew made many other expiditions that were not exciting enough for television. For example, Calypso supported studies about the placement of oil pipelines and the study of undersea geography. (At the time, large explosive charges were set off and their echos were recorded. When Cousteau saw the damage these explosions did to the environment, he banned their use on expeditions mounted from his ship. I believe this led to less destructive methods of echo sounding.) Cousteau and his crew were very active in the 1950s through the 1970s. Thor Heyerdahl was making his anthropological expeditions on the ocean.
Then came Sputnik. Suddenly, people realized that enemies could drop nuclear bombs on them “like dropping stones from an overpass”. Missiles, which was also enjoying much interest, became a matter of survival. Now, nobody wanted a nuclear war; but you could demonstrate to your enemies what you could do by supporting space exploration. Going to the moon was not just because humans are curious and explore; it was a game of "Top this! with the Soviet Union.
For the first time, humans were leaving the atmosphere. We were in the Space Age. Everything had a Space Age “feel”. I remember my dad’s '66 Ford Galaxy 500 (the “Ford 7-Litre”, as we called it). The taillights resembled spaceship exhausts, lots of chrome bits, “spaceship” themed console, etc. Space was exciting! “Hey, we’re going to the Moon!” Underwater was fine back in the '50s with Sea Hunt and all; but “We’re going to the Moon!”
So the Public were more excited by spaceships than by fish. Politically and militarily, space was seen as more important because of the ICMB thing. And in the 1960s, there was Star Trek. We’ll never get to boff the alien babes if we stayed mucking about underwater!
But there were some important experiments underwater too. Conshelf and Sealab missions, for example. The Earth’s population was (and still is) growing. The Sea was seen as an unlimited resource that would feed the planet. Aquanauts would become underwater farmers and ranchers. Cousteau even suggested creating a race of surgically altered humans who could live permanently underwater. When I was a kid, one of my favourite cartoons was Sealab: 2020 (which I understand is being remade as a comedy thing). At the time, it was thought that “The oceans will save us!”
But then came the 1970s. There was the energy crisis, economies sagged, there was less money available. The Flower Children seemed to be becoming the Me Generation. Sure, the ocean is nice; but we’ve got to get off of this planet before we blow it up! Yeah, the Cold War was still on. With limited funds, we could learn to farm underwater; or we could build better space ships to show up our opponents. And in many ways, it’s easier to build a space ship than an undersea habitat.
So I think that there are many factors that make space exploration “more important” than undersea exploration in the public’s mind. Flying through space is more exciting. Entertainment (Star Trek, 2001: A Space Odyssey, Lost in Space) focused more on space exploration than undersea exploration (Voyage to the Bottom of the Sea), and this made people tend to forget about the ocean. Feeding the world through more chemicals on the land was easier than undersea farming and ranching. (And many people may have been turned off by the idea of some sort of seaweed soufflé for dinner.) And there was “keeping up with the Joneskis”.
There are still scientists making important discoveries underwater. With the popularity of undersea shows on “science” channels and the demise of our great Cold War adversary, we may see renewed interest in oceanographic exploration.