Is there some kind of bodily fluid they can test for that?
Well yeah, but a T-38 is really cool!
This concept was based on reasoning that pilots who weren’t dead had been tested in high pressure critical situations. They also assumed they would have been military pilots. So there was an idea that pilots were a superior type of human being. Ask any pilot and they’ll tell you it’s true. It was a good idea to look for the best people, and they did eventually.
While I don’t think there should a pilot requirement for all astronauts, if I was a passenger in a spacecraft I’d feel better knowing a guy who can land a jet fighter on an aircraft carrier on the open sea at night is the pilot of that spacecraft.