Humans (but not necessarily Homo sapiens) have been around for millions of years.
What happened here is what another poster said above. The male chromosome is lost whenever a man does not have sons. So, in a small population (as humans were that long ago), it is conceivable that there is only one unbroken line of male ancestry. As the population grows larger, with more males carrying that variant of the Y chromosome, the chances of that specific chromosome surviving are greater; other Y chromosomes have a larger chance of disappearing.
This story is a bit misleading. The ancestor 340K years ago is not the source of Y chromosomes for the entire population. That specific Y variant only exists in one village in Africa. All other men tested have a newer Y chromosome variant from an ancestor who lived around 200K years ago. I wouldn't be surprised if other families with variant Y chromosomes are found as time goes on. We are still a long way from knowing the genome of every single person, or even a statistically relevant number of people.
Or ‘we are still a long way’ from knowing just how little of what we think we know is actually true.