It was imposed upon them by the Death Eater-led ministry.
To quote Griphook:
“But it is, it is precisely that! As the Dark Lord becomes ever more powerful, your race is set still more firmly above mine! Gringotts falls under Wizarding rule, house-elves are slaughtered, and who amongst the wand-carriers protests?”
(Harry Potter and the Deathly Hallows, Chapter 24- text available on Pottermore)
Security at Gringotts was usually controlled exclusively by Goblins. Under Voldemort's reign, however, they were forced to yield those jobs to Wizards.
As Griphook had already warned them, the liveried goblins who usually flanked the entrance had been replaced by two wizards, both of whom were clutching long thin golden rods.
(Harry Potter and the Deathly Hallows, Chapter 26)
Goblins considered themselves neutral and desired no part in wizard's conflict.
There was another pause in which the fire crackled and the river rushed on. Then Ted said, “And where do you two fit in? I, er, had the impression the goblins were for You-Know-Who, on the whole.”
“You had a false impression,” said the higher-voiced of the goblins. “We take no sides. This is a wizards’ war.”
“How come you’re in hiding, then?”
“I deemed in prudent,” said the deeper-voiced goblin. “Having refused what I considered an impertinent request, I could see that my person safety was in jeopardy.”
“What did they ask you to do?” asked Ted.
“Duties ill-befitting the dignity of my race,” replied the goblin, his voice rougher and less human as he said it. “I am not a house-elf.”
“What about you, Griphook?”
“Similar reasons,” said the higher voiced goblin. “Gringotts is no longer under the sole control of my race. I recognize no Wizarding master.”
(Harry Potter and the Deathly Hallows, Chapter 15)
It should be noted that Gringotts did hire wizards, even if not in security positions.
“I know goblins,” said Bill. “I've worked for Gringotts ever since I left Hogwarts. As far as there can be friendship between wizards and goblins, I have goblin friends -- or, at least, goblins I know well, and like.”
(Harry Potter and the Deathly Hallows, Chapter 25)