Master Valen and the other 48 city masters are the wandering cultivators who roam from one world to another.
The reason why they roam from one world to another was that their homeworld was destroyed by some invaders who took cultivation resources from their worlds and destroyed their worlds for its soul.
Every world gives birth to consciousness and with the time that consciousness grows and becomes the souls of the world. It is coveted by many cultivators and that is the reason why invaders search for low-level worlds without the protection of an immortal because it is easy to invade.
All 49 city masters belong to 49 different worlds who were acquainted while roaming from one world to another.
Later they became sworn brothers and whether it was their luck or destiny, they found this world where humans constantly lived in fear because of the spirit beast hordes.