Well, as I understood it, in the original games, it WAS a top level Ratata. Read the numbers somewhere.
Things changed, right? So maybe this did as well?
I thought so too, so I checked the original Gold. Joey's Rattata's IVs there are 9-8-8-8-8, where Gold/Silver uses a scale of 0-15 for IVs. Joey's Rattata's stats are average in Gold. I'm not certain he makes the "top percentage" claim in the original Gold/Silver.
I remember someone looking at Joey's Ratata and finding it had an Adamant nature and 31 attack IVs, actually
I also heard the claim that Joey's Rattata had all-31 or similarly high IVs and Adamant nature, but became suspicious when I couldn't trace it to a reliable source. Reports also clashed on his exact stats. One said all-31, one gave stats varying from 26 to 31, another "all 3 or under", and another "all zero". That's why I decided to see for myself.
I used a "snag trainer's Pokémon" Action Replay code to catch Joey's Rattata several times. Each time I made a copy of the save and edited it in Pokésav to verify that any given trainer's stats are always the same. I had previously confirmed this in Pokémon Ruby and Pokémon Red by examining memory in the Visual Boy Advance emulator, but couldn't use this approach with HGSS. The DS has too much memory and the Pokémon data format is encrypted from Diamond/Pearl onward, making it more difficult to read the digits off manually.
Joey's Rattata always had the same PID and IVs of zero. My first concern was that a glitch of the game had simply failed to generate any IVs, so I decided to determine if the game always gave trainers zero IVs, or only Joey. I decompiled the game ROM using a Pokémon ROM editor called PPRE, after trying several generic DS ROM-unpackers and parsing about half the numbers in the Trainer data structures by hand. Using PPRE I experimented with changing Joey's stats around, and concluded that a mystery byte in each Pokémon's data, which PPRE calls "u0", determines the IVs of that Pokémon.
My initial hypothesis was that IVs were determined by trainer class, having heard that Cynthia's IVs were all 30 or 31, but changing Joey to Cynthia's class only changed his Pokémon to female, leading to the other discoveries about trainer class and Pokémon gender. I did notice that the u0 value correlated with trainer difficulty, with Cynthia having a u0 score of 250. Dividing the u0 score by eight (rounded down) gave a u0-250 trainer the IV of 31, and when I increased Joey's Rattata to a u0 of 250, its scores increased to 30 or 31.
Since Youngster Joey's Rattata's u0 value was zero, even in re-matches, Joey's Rattata always has zero IVs.
Also you coulda learned all that shit just reading Smogon. They've got it all hashed out, bro.
I didn't find Smogon very useful for this research. Smogon's focus is on competetive multiplayer, not in-game trainers.