In the Spring and Autumn Period, a man in the State of Song raised monkeys. The monkeys could understand what he said. As the man became poor, he wanted to reduce the monkeys' food. He first suggested that he give them three acorns in the morning and four acorns in the evening. Thereupon, the monkeys protested angrily. Then their owner said, 'How about four in the morning and three in the evening?' The monkeys were satisfied with that.
This idiom originally meant to befool others with tricks. Later it is used to mean to keep changing one's mind.