I think it depends on what one wants to get out of the research. If the goal is a commercially realizable product on a shortish time horizon (say < 50 years), then cosmology may not be the best approach. But the justification for cosmology and much of astrophysics is typically that it is a probe of fundamental science and the acquisition of knowledge for its own sake. In which case whether we can ever travel to other planets or galaxies is moot, since it's the physical understanding and knowledge that's the goal.
Many before me have used the example of relativity, which when proposed, seemed to have little practical value. But GPS wouldn't work without relativistic corrections. 100-120 years ago one could've made a similar statement about fundamental physics and work on relativity. But if we'd abandoned it because of a lack of immediate relevance then we wouldn't have workable GPS today. The benefits of fundamental research (in many areas, not just astrophysics) are often quite difficult to forecast.