I assume it's the same reason people bike on I-5. If there's a good route through the mountains, either a major road or rail or both is likely using it.
As technology improved, a longer tunnel was built lower down the pass to decrease the elevation gain for trains, and the old route became obsolete. I suspect that this is not a unique story, and the question would be whether the old railway routes are still safely navigable.
Trains need gradual inclines and really large radius turns. Cars can handle steeper inclines and sharper turns. If necessary, humans can do very steep inclines and very sharp turns. And they can handle narrow paths. You'd obviously want to minimize that, but it's possible.
Since the requirements are different, the possible routes may be different.
https://gis.railstotrails.org/grtamerican/
It includes the Route of the Hiawatha:
https://www.ridethehiawatha.com/the-trail
Which is on the Montana-Idaho border way up in the mountains in a very sparsely-populated area. It's operated by the Lookout Pass Ski Area and one end of the trail is the ski lodge. Going on that trail is truly memorable:
> The Route of the Hiawatha mountain bike or hike trail is 15 miles long with 10 train tunnels and 7 sky-high trestles. The ride starts with a trip through the 1.661 mile long St. Paul Pass Tunnel, also known as the Taft Tunnel. It is a highlight of the trail that follows the crest of the Bitterroot Mountains near Lookout Pass Ski Area. The best part is.... it's mostly downhill with shuttle buses available to transport you and your bike back to the top.
https://www.adventurecycling.org/
As another commentor has noted in this thread, routes may not always be ideal because they often have to use existing available road infrastructure, so be careful and check road conditions in advance (and if you can, provide feedback to other cyclists and local communities) - but cycling can be a unique and self-determined way to explore that you'll rarely find in any other kind of travel.
Of course there are options to go around both the Sierras and the state of Nevada, Route 66 and up the San Joaquin valley being one example.
In fact many miles of the trail they are showing are undeveloped and you gotta push your bike still.
but obviously, just ripping out the rails is not enough. a lot more work id needed to make a rail track usable for biking.