G used to play around with what went into the allinanchor calculations and I suspect domain names were one of them, and led to their popularity.
KWs in file names certainly were, I have pages that target "
SEO widget" through internal links/anchor text but use search-engine-optimization-widget as the file name.
Quite suddenly and for about three months these pages started ranking for the full term and then just as suddenly disappeared again.
Y! still seems to like them, but these days I probably wouldn't bother using hyphens in domain names, they're a bit clunky for humans IMO....