Private credit’s meteoric rise to a roughly $3 trillion cornerstone of global finance was fueled by demand for lending outside the traditional banking system.