Serious (and long) answer, since it's a subject I enjoy. It seems to me the opinion that Rap shouldn't be part of the Rock and Roll HoF is fairly recent and comes from a culturally tinted view of Rock and Roll.
Rap is a direct offshoot of rock music. It was literally built on samples from James Brown, Sly & the Family Stone or Parliament/Funkadelic. In 1969, whether you were listening to those or to Led Zeppelin, Cream and Steppenwolf, nobody was doubting that you were into rock music. All those bands were building on guys like Muddy Waters, Willie Dixon, Louis Jordan or Big Joe Turner.
Now the next generation of artists took what they liked from 60’s and 70’s rock artists and built upon it. Many new African-American artists were putting emphasis on the rhythmic and funky side of the music (Marvin Gaye, Earth Wind & Fire, Michael Jackson…), while many other went for the heaviness of it (AC/DC, Metallica, Van Halen…).
That’s where it derails…
For reasons that, to me, are deeply rooted in Anglo-Saxon cultural dominance, the latter branch, being appealing to the overwhelming demographic majority, became seen in the mainstream as what rock was all about. Toughness and anger became the sanctified image of the rocker. White males with long hair and electric guitars. The other branch which gave birth to disco then hip hop and contemporary R&B was pushed aside and often derided by the majority, even if commercially incredibly successful.
So, the contemporary definition of rock and roll is incredibly distorted. Every year a lot of people get up in arms about Hip Hop being considered for the Hall. I’d tell those people to go listen to Sabotage, 99 Problems or Mama Said Knock You Out and tell me with a straight face that it’s not rock enough to be in the same Hall as Cat Stevens, Chicago and Joan Baez. Amongst the 2 first class of HoFers were James Brown, Bo Diddley, Ray Charles and The Coasters. I fail to see how Iron Maiden, Foo Fighters or The Go-Go’s are, in music or essence, closer to those artists than Jay-Z, Tupac Shakur or LL Cool J.