There is no purpose to manned spaceflight.
There's always purpose to investigating the unknown. If we didn't, we'd still be living in trees.
You need both. The Science figures out what is interesting enough to investigate in detail. Manned missions then do that detailed investigation. The Moon landings weren't for science - they were a political statement. The science was just a bonus of that statement. But learning how to mine asteroids? Efficiently get between the surface and LEO and points farther? Will infinitely improve the human condition. They won't do it for probably 50-100 years, but that doesn't mean we don't do them.
Now, you need a lot more unmanned missions to figure out the few manned missions that will be worth the time and money.