Did you do the quest in the "normal" order ?
Basically you didn't go straight to open the garage before the game asked you to. (Discover the garage (Rancho) > meet James > find Josie > re-meet James > open the garage).
"normal order" it's without spoiler
I know, it's possible to open the garage without finding anything (and enter directly the code).
In my second playthrough (a while ago), I have this bike just after leave V's apartment (after "the heist" and even before meet Goro at Tom's Diner).