For some reason, if memory serves, sometime in the late 8.0 patch era the spellbook was updated to include mount skills. The idea was that you'd be able to hotkey those skills rather than having to use interaction hotkeys that might otherwise get moved around when around interactable objects. The trouble is that even if you don't necessarily have the mount, you'll still have the hotkeys in the spellbook. If the hotkey refers to an ability of a specific mount and that mount isn't in the stable, then you don't actually have that mount. Your spellbook just hasn't kept up with things accurately.