That's true, but Roy Moore was running as a Republican so he got a lot of votes merely from being an R. If the parties of the candidates were reversed, Moore wouldn't have gotten many votes at all. In fact, the heavily Democrat areas (Birmingham, Montgomery, the Black Belt) would have had trouble voting for Moore regardless of being a D because he was so nutty and wasn't exactly a friend of blacks.
Alabama in general is heavily Republican. That's shown by Tommy Tuberville winning the Senate merely because he ran as an R. It certainly wasn't his political savvy.