I think once they start having homework in kindergarten "doing all the class work during class" is a goal that won't be reached.
Many of the professors I have worked with that I respect have different methods for helping these students- for example sending them an email after class, offering explicit direct help & advice. Or connecting them with a better job, or a research position.
Not specific hints or answers, that’s obvious favoritism
put another way, they showed up and asked questions and got info -- and you didn't. that's not privilege, that's effort
To answer your question, I don't recall ever going to "office hours", as I was generally a top student with minimal effort and an autodidact, but I learned about it through friends. Having parents who are both professors also gave me a front-row seat to how common this was.
I used to think this was wrong, until I got into engineering.. Sure there is the rare math problem, but most of the difficult part was: "Are you willing to fly to mexico and be awake at 3am when the parts are made?"
I might be downplaying though... I did calc 1 at a job.
It probably wasn't intentional, just 'I have x minutes a day with the students to teach them the day's lesson. I have more than x minutes worth of content to convey. If you willingly spend more time with me, you may get information that was lower in importance and was missed during the day's classes.'
Chatting with professors after class or attending office hours might be a grift, but it's not necessarily unfair. Specific circumstances aside, anybody can do it to get some leverage.