Alliteration is a classic literary device and it works the same way in names: the repeated sound creates rhythm and memorability. Think of the fictional staples, or of public figures with alliterative names. They stick in the mind.
When alliteration works
It works best when the two names have different lengths. A short-long pairing (Leo Lawrence) lands more cleanly than a short-short (Leo Luke) which can feel like a tongue twister. It also works best when the initial letter has a crisp sound: H, M, S, F and J are natural favourites.
When to avoid it
If the surname also begins with the same letter, tread carefully. A triple-initial can read as cartoonish on a birth certificate, though some families lean into it with great affection. Say the full name aloud a few times before committing.
Alliteration is a gift to the ear. Used lightly, it gives a name a built-in music.