I have noticed in the past several months that I have occasionally been getting segment jerseys that definitely don’t belong to me (basically any QOM jerseys, or sprint jerseys on rides that have been strictly Z1/2). In these cases, I also notice that when the leaderboard for that segment shows up again (either because I’m approaching the same segment, or some other leaderboard and I manually select that one), my actual position is 4, 7, 20 or whatever (anyway big enough that all of them couldn’t have finished in the past few seconds) and my leader’s jersey goes away as it should.
My best guess would be that when the leaderboard updating was optimized, somebody forgot to make sure it is still updated when awarding a jersey to the user, and I simply get it because it was last updated after I completed the segment and all the results better than mine are over an hour old at that point so my result must be the current best one. I guess the jersey must be visible to others as well since I often get ride-ons from random nearby riders when the jersey is granted.