Many science fiction stories are what we call "cautionary tales." They are called "cautionary" because the things that happen in the story are bad. Part of the reason authors write stories like these is so that we can *avoid* things like that happening.
The stories show how people were short-sighted or made mistakes with technology and science and the horrible things that can happen.
IDK... I just suddenly felt the need to explain this very clearly for some reason.