Why? for What?
If I understand correctly, then two pointers are created, and addresses are written in them as a string? And then this "address" is read, which is a "string".
Why not create a simple string and access the contents of that variable?
You are passing these two pointers to WiFi.begin which sets up some conditions necessary.
In WiFi.begin the pointers are used to retrieve the string data.
The original version, without any compiler optimizations, would store the text in char arrays, then create a separate char* to store the pointer to the char array, using more memory in the process. As a practical matter, the compiler likely never actually stores the pointers.
This will likely not compile, and basically does the same as the original, except that myssid can now be referenced in the code separately from ssid.
< edit > The most common reason for doing it this way, creating the char array and char* separately, is when you want the compiler to store both in the flash memory on a processor that has flash memory in a separate address space from the ram (reference the use of PROGMEM).
const char myssid[] = "My_WiFi_ssid";
const char *ssid = myssid[]; //likely compiler error because of the []