(dir profdir*) essentially returns an `ls` of the directory in which user profiles are stored. (Yes, they are (or were) stored to disk, not a database.) This was one reason it was hard to add a feature to rename users, which Dan somehow figured out.
So it takes the `ls` of that directory, giving a list in mostly random order, and loads them one by one, putting them into a hash table, whose iteration order is also random.
In modern times, profs* is populated in a lazy fashion whenever users post after a server reboot.
It does have a "try-order?" option, which gives a deterministic ordering if set. But whenever I set it, I sometimes get strange errors, at least on MacOS. Since it's disabled by default, I doubt they set it. Even if they did, it would be ordered alphabetically, which means your topcolor wouldn't be anywhere close to the top unless someone else whose name starts with "a" also set it.