We often confuse distraction with mind-wandering. This is a mistake.
Fantasies are not frivolous. They can be entertaining, distracting, frightening, even arousing, but they also allow for creativity and help us plan for the future. As long as we don't mistake fantasies for reality (as in delusional disorder and schizophrenia) or let them become too rigid (as in paraphilias), they provide a necessary escape from the here and now.