I think I found a possible bug (unless this is a possible feature).
The user-state object sent with each chat message contains a display-name, but a small percentage of users (so far I have seen about 3) don’t have a “display-name”.
They way I understand it works (and if this is wrong I hope someone corrects me), but a null or missing display-name field indicates that the user has never set their display name so Twitch Chat falls back to using their username but with a capitalised first letter in its place when displaying that user in chat.