In Cosmology we use the Robertson-Walker-Metric which follows from the cosmological principle & mathematics. This metric leaves three cases for a possible curvature (or geometry) of space (not spacetime). The curvature is describes in this metric with a curvature parameter $k$ which can be -1,0,1. Often different models are solved for special cases (like $k=-1$ and we just have matter etc.).
Since measurement reveal that $k=0$ (flat universe) why do we deal in cosmology with those other (physically irrelevant) cases like k=-1 and k=+1 if we know that k=0?