"And the name of the slain Midianite woman, etc." (Numbers 25:15). This is to inform you how far the Midianites had given themselves over: that they abandoned a daughter of kings to disgrace. "And the kings of Midian they killed [... and Zur]" (Numbers 31:8). Zur was the greatest of them all, but because he abandoned his daughter and exposed her publicly, Scripture diminished him and counted him third. But he was the greatest king of them all, as it is said: "head of the nations of a father's house in Midian he was" (Numbers 25:15).
Why Scripture Demoted Zur, the Greatest King of Midian
Midrash Tanchuma Buber, Pinchas 3:6
ושם האשה המוכה המדינית וגו' (במדבר שם טו). להודיעך עד כמה נתנו המדינים עצמן, שבת מלכים הפקירו בקלון, ואת מלכי מדין הרגו [וגו' ואת צור] (שם לא ח), צור גדול שבכולן היה, ולפי שהפקיר את בתו ופירסמה, גרעו הכתוב ומנאו שלישי, [אבל הוא מלך גדול שבכולם, שנאמר ראש אומות בית אב במדין הוא] (שם כה טו).