Maybe because there are lots more flies then butterflies? Or maybe because flies are attracted to our houses because of food smells etc , whereas butterflies are just looking for flowers..?
Plus, flies are flying rubbish bins which move quickly, and don;t bother too much where they are going, or where they end up. Butterlfies tend to move in a much smaller area, confined to the flower scecnt that they like, and hardly ever drift away from it.
How is this for a coincidence. This has never happened before but this afternoon a Red Admiral flew in to my living room. I managed to catch it and release it unharmed, so there we are they do fly through our windows.
Butterflies do come indoors - I have a Peacock in the spare room which is ready to hibernate (they overwinter in dry, sheltered places like barns, garages, sheds etc). I had about 10 of them in my shed over last winter (they hang from the ceiling).
As andy hughes says, they do generally just wander about looking for flowers to feed from and places to lay eggs. However, they can have fairly extensive ranges in which they regularly fly in search of these things.