Why did the ancient kings name themselves with A, B, C and D?

just like the kings of Shang dynasty. . . The name is also gradually developed. At first, no one had a name (for example, Youchao and Shennong only had tribal names), and then they began to take heavenly stems and earthly branches as their name (Shang Dynasty). The Xia dynasty has not been clearly researched, so we can ignore it first), and then the first word name (Zhou dynasty), then the first word name (ranking/native place/occupation+) as the initial two-word name (Eastern Zhou dynasty), and finally gradually developed into a general two-word name (Wei, Jin, Southern and Northern Dynasties).