The only thing Slash played on Black or White is the guitar on the opening skit - the place where Maculay Culkin makes the sound with guitar and his father comes in the room , that's it. Slash is credited as "intro", his performances with Michael created the mis belief that he actually played all the guitars, it wasn't the case.
And you are right, it's for publicity. Slash intro is a lot better than Slash the 2 second sound on the skit, similarly Dave Grohl drums is a lot better than Dave Grohl snare drums. They are over crediting people to benefit from their name.
As far as I can see Dave Grohl's unhappiness is due to the fact that not all of his work is used. Slash was a lot worse imo, waiting for years, letting people to think he played the guitars on Black or White and after Michael's death calling the guitar riff - which he played twice live btw - "gay".