Cosmology is the attempt to understand in scientific terms the structure and evolution of the universe as a whole. This ambition has been with us since the ancient Greeks, even if the developments in modern cosmology have provided a picture of the universe dramatically different from that of Pythagoras, Plato and Aristotle. The cosmological thinking of these figures, e.g. the belief in uniform circular motion of the heavens, was closely related to their philosophical ideas, and it shaped the field of cosmology at least up to the times of Copernicus and Kepler.
Nowadays it is not uncommon among scientists to question the relevance of philosophy for their field. This may be part of a simplified view according to which science is mostly about finding the best match between theories and empirical data. However, even on such a view one can identify interesting philosophical issues, like underdetermination of theories and theory ladenness of data. Moreover, apart from matching theory and data, science is often concerned with what the studied theories implies for our deeper understanding of the world. This involves the philosophical activity of interpreting the theories in question, and philosophy thus continues to be an integral part of scientific, including cosmological, thought. One may argue that cosmology is even more philosophical than most other sciences, in that it more explicitly deals with the limits or horizons of scientific knowledge. In particular, as cosmology involves the age-old questions of the possible temporal and spatial limits of the universe, it is naturally associated with irresistible speculations of what may cause or lie beyond those limits.
"Philosophical aspects of modern cosmology" by Henrik Zinkernagel