The purpose is so that the output can never be predicted out of this range, as this makes it easier for the model to train. It gives the model less opportunities to be wildly wrong. This is deemed a reasonable range as prediction is unlikely to go outside this range
But definitely worth experimenting with what happens if you remove y_range.