Ah that makes sense.
To my understanding that is how games force shininess.
From what I understand, the games rolls a shiny check, *before* the seed is rolled. (Which the seed is used to determine various stats such as PID, IVs, Height , Weight, EC, etc), and the result from the shiny check would result in either (1) Shiny or (2) Not Shiny.
So if you rolled a shiny for the shiny check, but the resulting PID from the seed is not shiny, that is supposedly how the game assigns you a forced shiny PID (by modifying the top half of the PID).
[which is square shiny]
[extra info: if you rolled a shiny for shiny check, and have a shiny PID from the seed, the game won't force shininess on you. That's how you get star shinies for these wild encounters]
Well, glad it's all sorted out :3