If someone doesn't have stellar grades in high-school, and in the bachelors:
- Is there really any possibility for him to work in the field of academia?
- Does earning a Ph.D. help much, or is it just a waste of time in this case?
If someone doesn't have stellar grades in high-school, and in the bachelors:
Nobody in theoretical computer science cares where you got your degree. Really. We. Do. Not. Care. We only care about the quality and visibility of your results. Publish strong papers and give brilliant talks at top conferences. Convince well-known active researchers to write letters raving about your work. Make a good product and get superstars to sell it for you. Do all that, and we'll definitely want to hire you, no matter where you got your degree. On the other hand, without a strong and visible research record, independent from your advisor, you are much less likely to get a good academic job, no matter where you got your degree.
If people don't care where the applicant got his/her PhD, they are not going to care about high school or Bachelor's grades. Even outside of academia, it's a general rule that one's latest degree supersedes all the previous ones. Once a person earns a PhD, nobody cares about his or her Masters, Bachelor's, or high school results.
The real concern here is whether the person who didn't do well in high school and in the Bachelor's can still earn a PhD, but that is for a separate question.
Yes, provided you can get into -- and complete -- a good Ph.D.
All of this presupposes you are interested in an academic career. Once you have a Ph.D., your future career in academia will look primarily at your Ph.D., and your publication/research record since then. If those are good, it's pretty unlikely (North American, pure/applied science perspective here) a hiring committee will turn you down due to previous grades, or educational pedigree prior to the Ph.D.
The flip side is that a super prior educational pedigree (grades, institutions, awards, etc.) can certainly positively complement even a good Ph.D. for your first post-Ph.D. job, since it buttresses an "achiever" image. And I've seen superior prior educational pedigree compensating for quirks/inconsistencies in your Ph.D. profile, such as unusually long time to complete, inscrutable or laconic letter of support, weaker publication record, not in the spirit of an explicit pro-con analysis but as greater confidence for a hiring committee that they can look past the quirk if they otherwise want you.
However, none of this takes away from the fact that a good, solid Ph.D., with good publications and reference letters, will draw a line under quite a bit of prior questionable academic performance. To the extent a hiring comittee later notices those issues, there will be a feeling of "but I assume the admission committee investigated that....and look, the candidate did good [Ph.D] work".
Of course, Ph.D. admissions committees are a different story, and while there are heartwarming stories of committees that that take the time to look past grades, the unfortunate reality is that you had better have a very good narrative what happened, and impress the institution which you want to attend. If the program is at all selective, they will be concerned whether you'll be able to finish. A Ph.D. takes a lot out of you, and if you weren't able to hack high school and bachelors, why will grad school be different -- for you? And if they're not being concerned and selective, you should wonder if they just want your tuition money (and/or slave labour) until you fail....
Finally, worth saying that there are many reasons your prior academic performance may have been sub-par (personal/family health issues, socioeconomic status and quality of schools you were able to attend, etc.) that ought not be derogatory for you, i.e. much better than "I partied too much and/or didn't really know how to study". I do think the system is steadily getting better at consciously looking for such explanations, especially for so-called "diversity candidates" but also more generally as the push for diversity gradually -- and inconsistently -- challenges lock-step assumptions on success even for candidates who don't check one of the conventional diversity boxes.