Dags are the sheep's poo that has gotten caught in the wool around their bottom. It became a metaphor for people who are socially maladjusted: nerds, dweebs. With time its meaning has shifted again. It has actually become a backhanded term of endearment. Someone who is oblivious to mainstream culture, but nevertheless friendly and ingenuous, is now also known as a dag.
In Seattle is a little hamburger stand called "Dags", perhaps after the cartoon character Dagwood who is notorious for his gigantic sandwiches. Australians seem to love to go there and make a purchase, so as to send a "Bag of Dags" back to their mates at home. Ah, the joys of accidental humour!