Why use uvm_config_db to pass vif or configuration object is recommended?

In reply to chr_sue:

I have set the uvm_config_db for agent_config class in environment and i have getting that in wr_agent and rd_agent, this is causing the error.