The presence of both the "username" (which, unlike on other platforms, is not identifying and not unique) and the display name doesn't make a lot of sense, indeed, and I don't know why it was ever a thing.
However, you are free to set one and not the other (I think a client should display whichever one you di did set) or set both to the same value (which I see many people do).
I think it makes some sense to have both fields, although it may be confusing, because people can set them to different values: a short, one-word original nickname as a "username" and a longer, possibly less original, name as a "display name", which may be your real name (if you are not anonymous). I believe there's something similar on IRC.
Clients can display one or the other as the primary name for a user, depending on the style they want to have: you want a HackerNews feel? Show usernames. You want a Facebook feel? Show display names.
For example, my username is "Apsie96", but by display name is "Valentino Giudice", my real name. There is no rule to follow and I could even have swapped them, but I think it's better this way.
While I might have opposed the double field, for essentially the same meaning, I'm actually not against the presence of display names for this reason.