It is difficult to answer this without the “opinion” sin, but Star Wars was very dear to Lucas. It was a story he had worked out in his head for a long time and written several drafts for. It's also based on many things from the past.
The Force is loosely based on ancient religions and martial arts. “Energy is in all things, let it flow through you.” “Sense danger.” I have read in the past that it is particular to a religion from Thailand, I think, but I could not find a source to back that up.
The story is based on the movie The Hidden Fortress. Lucas has said this. It is a story from historic Japan.
The theme and the lead character’s journey is strongly influenced by Joseph Campbell’s book A Hero with a Thousand Faces. Campbell’s point, if I can summarize, is that the Hero’s story is almost always the same and it is something everyone can related to. Pretty much everyone relates to Luke, they might like Han better, they might like Leia better, but they relate to Luke.
The story felt, to Lucas, familiar and ancient. He did not want to approach it as a brave new world or interesting future, which is how Star Trek, as one example, kind of approaches its world. Lucas felt like he was retelling an old story, not presenting a future.
A long time ago in a place far away, or something similar to those words is often used at the beginning of fables and it is familiar to most movie-goers. It has a story-telling ring to it, and those words have been used in Aesop and other story-telling venues. I believe Lucas wanted to start out by giving the movie viewer that familiarity. He did not want the first impression to be a space-ship chase. He wanted the first impression to be “This is an old fable.” because that is what it was to him. Then he followed that with a magnificent space-ship chase, which was a brilliant contrast in my opinion, and wonderfully backed up by the orchestral music. The whole approach was brilliant.
But I think his reason for doing it went beyond the contrast. I believe, he genuinely wanted to begin by telling the viewers “this is a fable”, because that is what long ago and far away suggests. He wanted to begin his movie with that familiarity.
And, just to add, “Rescue the Princess” is also straight from countless fables. The movie still works as a futuristic looking space adventure, but it has got its roots in fable.