Although the main focus of government funds is on space programs, ocean exploration gives more opportunities and has more unrevealed mysteries that can be useful for science in the near future, so the oceans are more important to research than space. There is an opinion that scarcity of resources is one of the greatest problems which forces.
Yes, space exploration cost huge amounts of money, and this money can improve people’s life in many ways. In my opinion, I do not think that space exploration is waste of money; and it is more like a long-term investment. We invested hundreds of billions on space exploration, and it is a huge investment for mankind. Someday, the Earth may not.