3 AnswersNew Answer
Supporting @Tiago Soares: When you declare a variable, c++ allocates memory for it. It does not however 'clear it' to some default value. You get whatever garbage was left over from the last program that used it*. Try to use that and most of the time your app will crash due to an access violation/fault. *Mostly true; SoloLearn and cloud services have more advanced housekeeping; you tend to be safer here.
To assure the pointer is not point to a random memory address. Furthermore, you can test through your program more easily if the pointer is being used or not. ..
Its called a dangling pointer if you dont nullify it. This leads to safety issues as the others said. You dont want to be referencing memory that not being used. Nulling the pointer allows you to safely check if the pointer is null before doing something with it, otherwise you can cause crashes or undefined behavior