Jesus died on the cross for the sins of the world, not to save the whole world but to make it possible for sinners to come to Jesus so that they might be saved.
John 3:17
For God sent not his Son into the world to condemn the world; but that the world through him might be saved.