It is to keep them from getting stuck in the fence. They can push their horns through the fence, but then the horns catch when they try to pull them back through. Here is a thread on a goat forum about it. Looks silly, but keeps them from getting hurt and saves the owner from having to rescue them every five minutes.