Dogs explore their world through taste and smell. Most likely, your dog ate something inedible because he or she was trying to determine if it was tasty or nourishing. This is, unfortunately, normal dog behavior.
However, if your dog continually eats inedible materials or shows compulsive behavior to eat foreign bodies, it's worth having a conversation with your veterinarian. Something else could be going on that may be treatable. They may be bored, depressed, anxious, or they may have an unbalanced diet or another serious medical issue.