The class uses the field automation macros, which will attempt to get the value from the config_db() using the variable name.
Neither of these methods are recommended. Instead, you should have a configuration object which encapsulates all of the configuration variables, reducing the number of calls to the config_db.
The uvm_object_defines.svh file has all of the different uvm_field_* macros defined. I believe that it has to do with the UVM_SET* parts of the macros.
I’m not sure what will happen, as it is HIGHLY recommended to NOT USE the field macros, and therefore I have never tried.
My assumption is that if nothing has been set() in the config_db for the specified variable, then the get() will silently fail. The implicit assigning of values by the macro does nothing to prevent you from calling get() when you need to.