I think hogwarts sold so well because of the JK backlash. Brought a lot of attention to the game. It was a good game though. Baldurs is getting attention because of how good it is. And treating your customers with respect goes a long way. I just bought DOS 1 & 2 because of how much I'm enjoying BG3 and wanted to vote with my wallet. Plus I hear they're also really good.
I think Hogwarts sold well because it was a genuinely good game which captured the spirit of the franchise, a decent story line, an explorable world and had some decent combat mechanics.
I think the JKR boycott did help in an underhanded way because most of the protesting was shrill straw man character assassination. People tuned it out and bought the game anyway based on word of mouth. The real losers in this nonsense were gaming websites who undermined their own credibility by boycotting the game or scoring it badly just and turning the review into a diatribe about gender politics.