The will to do science originates in the urge to explore. Whether we're spending the money to send people or robots, it's not a rational pursuit. We explore because we want to. Why do we want to? No one knows for sure.
Human spaceflight is valuable because things are emotionally different when a human is doing them. That's why spaceflight is so much more expensive when humans are aboard: because we have higher standards for humans, despite the obvious evidence that human life is abundant and cheap. The value of a human to another human is primarily an emotional calculation, not economic.
Even when the mission remote asset is a robot, we focus on the human element. Coverage of robot missions always includes a lot of people cheering at the launch, reactions in the control room, interviews with project leads, etc.
So, I would not be so quick to dismiss human spaceflight based on metrics of efficiency. The whole thing of exploring space is inefficient, and serves no practical purpose. Spaceflight runs on inspiration, and that's something we haven't figured out how to automate (and IMO never will).