Anyone can credit anyone else on these listings, if they choose, and if they are members of the organizations those "anyones" receive royalties. Most people do not, but there are the very famous cases where a credit was given and then listed as a gift (engineer Hank Cicalo with The Monkees' "No Time" who had nothing to do with writing the tune), or taken by force (any number of songs with names like Morris Levy getting a credit).
Or some bands have a setup where only one member receives credit for the entire song, when in reality, especially in groups, it is rarely a one-man show, yet look at credits for some of the bigger name rock bands of the past 10 years...sometimes it's just the lead singer getting credit, and in one very specific, successful band's case, this is pure nonsense since the guitarist(s) did most of the music.
I wouldn't take any credits listed for publishing or writing as definitive or even complete. They can help fill in some information or shed more light on the song's creation, but are in no way 100% accurate to what actually happened with the tune. It's all about what the person who files the papers decides to list.
(Personal note: I wish I had gotten credit for writing/playing a guitar part in a song that got used in a few movies and TV shows, but as I wasn't the "principal songwriter" and just a musician, yet one who wrote the part, I got zip.

)