That's irrelevant. "Former astronaut" is buttercreme icing on any political resume.
His thesis was "Line-of-Sight Guidance Techniques for Manned Orbital Rendezvous, the dedication of which read: "In the hopes that this work may in some way contribute to their exploration of space, this is dedicated to the crew members of this country's present and future manned space programs. If only I could join them in their exciting endeavors!"
He then began work as an engineer on Project Gemini. He then applied to become an astronaut and was rejected because he had not passed test pilot qualifications. He sought a waiver, and was rejected. Fortuitously for him, the next round of astronauts NASA sought required being a test pilot or having at least 1000 hours of flying time in a jet. He had more than 2,200 hours in jets alone. And at that point, he applied again, and was accepted.
---
McCain [2] - prep school (where he at least wrestled), graduated from the US Naval Academy ranked 894 of 899 students. Completed flight school where he was regarded as careless and reckless, having crashed his craft multiple times. He then requested a combat assignment. The first carrier he was on caught fire killing hundreds shortly after he arrived. He moved to another carrier and was shot down and captured a couple of months later. Not exactly "The Right Stuff."
[1] - https://en.wikipedia.org/wiki/Buzz_Aldrin#Early_life_and_edu...
[2] - https://en.wikipedia.org/wiki/John_McCain#Early_life_and_edu...
A name also thrown around for shuttle. Do a little digging and a surprising number of shuttle crews had ties to the US congress, either as relatives or who themselves would later become representatives. They even flew a handful of serving reps (ie John Glenn, aged 77). Nasa has always known how to foster relations with political power families.