In addition to SpaceWolf1701’s details in their answer, a film overture like this had a more practical reason as explained in this 2018 Atlantic article that focuses on overtures in film; bold emphasis is mine:
“The movie overture—music set against a blank screen or still images before the drama unfolds—all but disappeared from film sometime in the 1970s. Once a Hollywood mainstay, overtures evolved naturally from their use in opera and road shows, giving moviegoers time to find their seats and settle in before the main feature. But these musical pastiches also served an important cinematic function: They allowed audiences a chance to put aside their thoughts of the outside world. With curtains drawn and house lights dimmed, overtures drew moviegoers in, and inward, toward a space of anticipation.”
You need to think back to 1979 when Star Trek: The Motion Picture came out: Cable wasn’t as pervasive and easily accessible as it now is and video tape players were not as common-place either.
Unless you were located in an area where cable was common-place — or you were financially well off — video tape sales/rentals and cable were not the normal ways the vast majority of people watched movies. And yes, movies were broadcast on plain-old broadcast TV. But if you wanted to intentionally see a new film that was not on TV — and not interrupted by commercials — chances are you had to go to a movie theater.
For the vast majority of people, if they wanted watch a movie in 1979, they simply had to go to an actual movie theater and sit down in a seat and wait for the film to start.
So the purpose of an overture in this case was to allow the expected crowds of people swarming in to see the highly anticipated first Star Trek film on screen find a seat and sit down. And it would also serve as s signal for anyone in the lobby to come into the theater because the movie was about to start.
Flash forward to now, and this overture seems incredibly tedious and ponderous. But in my humble opinion, the whole of Star Trek: The Motion Picture is incredibly tedious and ponderous. With pacing and long shots that bored me as a kid and make little sense as an adult.
Warning: Slight tangent ahead.
Minimized to avoid overwhelming the core answer above.
As cool as some of the special effects were, the storytelling in this film is truly a chore to watch and while it made back its investment at the box office, it was a critical failure.
And in retrospect, the seemingly never-ending overture coupled with similarly seemingly never-ending effects shots make me think reflects the delusion (arrogance?) of the studio — and Gene Roddenberry himself — that somehow Star Wars was an aberration and what the world was waiting for was a grand, new Star Trek film.
Remember, while Gene Roddenberry was trying to get Star Trek back on TV in the 1970s via Star Trek: Phase II, Star Wars came along in 1977 and not only changed the film game but also dethroned Star Trek as the best known science-fiction property in pop culture. So suddenly Star Trek: Phase II was reworked and reimagined into the film known as… Star Trek: The Motion Picture.
I can imagine Gene Roddenberry himself thinking, “Wow! So many people will be clamoring to get into the theater to see this masterpiece that I must pad the front of the film with a few minutes of nothing to give them time to get a seat and enjoy the greatest science-fiction film ever!”