On line 27 you are dereferencing a null pointer so I would expect some kind of crash, not any data.
As for p3, which happens to point to where p1 used to point...that memory has been deallocated, so you shouldn't be accessing it. It just so happens there is a 5 there. It could be anything. Your program could even crash if it felt like it.
Just because you delete data doesn't mean that the data that is being pointed to is reset, though in some cases it might be. It is potential that valid data is still accessible, though its just as likely that the system has now utilized that address in the memory to do something else.
Basically, don't do that. And yes, it was (sort of) just a coincidence.
Delete does not necessarily clear memory, it de-allocates it. This means the contents of the memory may not actually be altered.... but rather... it is no longer allocated so it is free to be allocated elsewhere.
I heard it described as a hotel room once. When you allocate memory with new, it's like you are renting a hotel room. You can put your stuff in that room and it's guaranteed that your stuff will stay in that room for as long as you have it rented.
Once you check out of the hotel (delete the memory), it's possible your stuff will remain in the room for a while. If you sneak back into the room, your stuff might still be there... or it might be replaced with someone else's stuff.