Its sleep, like what you get when you wake up. Its to get rid of oils, impurities, foreign bodies etc just like what our eyes or like, they have eyelashes which protect the eyes. The sleep or 'goo' is just a way of getting rid of things that dog's eye doesnt need.
you mean between the eyes in the corner? i think your talking about the discharge from the eyes. you know. the thing you get when you wake up in the morning and yawn and stuff.
Like its the same goo we have when we wake up. Eye water lol
Because dogs can't wash their face like we can.