It is said of speaking or doing foolishly. It comes from donkey, an animal that is known for its stubbornness and lack of intelligence.