Every professor has their own style, most of the ones I had were very open that office hours were a pretty great way to get help/more targeted hints on what to study. This isn’t in my opinion, a problem. Their goal is to educate you as best as possible in theory, via classes, homework, and office hours. Students who take the time and effort to attend office hours clearly want to at least pretend to be putting in extra effort, so why wouldn’t they out more effort into helping them learn? I doubt that they are directly giving away test answers.