There’s a lot of issues with Harry Potter and JK writing in general. Even if you want to hand wave the Goblin thing, she also introduces and normalizes race based slavery and only addresses the issue by setting up the only character to have an issue with it as wrong and annoying for even noticing.