About halfway through the story, readers get a very straightforward answer to this question. The Winged Monkeys have to obey the Golden Cap because the cap has a "charm."
This Golden Cap had a charm. Whoever owned it could call three times upon the Winged Monkeys, who would obey any order they were given.
Eventually, Dorothy acquires the Golden Cap, and she learns that there is a charm with the cap. The Queen of the Mice tells Dorothy about the charm, but Dorothy and the reader are still given zero information as to how or why that charm got there in the first place. We have to wait until Dorothy asks the King monkey that exact question.
"Why do you have to obey the charm of the Golden Cap?" she asked.
The King then tells Dorothy that a long time ago, there was a princess and a sorceress named Gayelette. She fell in love with a man named Quelala. One day, the Winged Monkeys decided to play a little joke on Quelala. The Winged Monkeys picked him up and dropped him in a river. Quelala wasn't upset, but Gayelette was furious about the incident. She threatened to tie their wings and drop them in the river. That would have been a death sentence, since the Winged Monkeys can't swim without the aid of their wings. Gayelette eventually handed out a different punishment in the form of the charm and the Golden Cap.
. . . so that Gayelette finally spared them, on condition that the Winged Monkeys should ever after do three times the bidding of the owner of the Golden Cap.