Believe it or not, I actually saw a Jacob's sheep do exactly the same thing in a huge old oak tree. We told the farmer and helped him for 20 or 30 minutes in order to get the thing out. It was none the worse for wear so it was turned loose. While we were standing around discussing this stupid sheep, it walked right back over to the tree and stuck it's head back in the hole again. After about another 10 minutes getting it free, the farmer dragged it off saying he'd be back to fill the hole with cement.
I don't know what the fascination is about sticking your had in a hole.