Yet, every single original TOS movie featured 23rd century Earth.
Which was odd, given that TOS went out of its way to avoid that.
Well, I guess that finally showing 23rd-century Earth in TMP was a conscious choice, partly to take advantage of the enlarged budget, and partly to give the audience something new -- plus, by this point, Roddenberry had started to buy into his own hype about being this great science fiction visionary and wanted to show off his utopian vision. Then TWOK probably opened on Earth in part so that it could reuse stock footage of the
Enterprise in drydock from TMP. And maybe TSFS had the ship return to Earth instead of to a starbase or something so that they could reuse the set they'd built for Kirk's apartment. For TVH, it was because they wanted to do an environmentalist story, so they built it around a threat to Earth's ecosystem.
After that, it just became a habit. There was no real story reason why the crew had to be on Earth in the first act of ST V; Shatner just wanted to climb a mountain. As for TUC, obviously the inclusion of the Federation President in the story justifies those scenes being on Earth, but the first scene with Kirk & crew could've been at a starbase if the movies hadn't gotten so much into the habit of featuring Starfleet Headquarters.
As for the TNG movies, 24th-century Earth was frequently involved but almost never directly visited. The
Generations prologue was in Earth orbit and around the Sol system, but that was it for non-holodeck Earth. FC involved an attack on Earth from space, but we only saw the surface of 21st-century Earth. INS took place entirely in deep space. NEM opened with the wedding reception on Earth, and then had Earth under threat from Shinzon, but not actually seen until the epilogue. I gather that for a while, there was a belief among movie executives that audiences wouldn't respond to a story that didn't involve or threaten Earth in some way, so that's why Shinzon's attack on Earth was tacked on, and possibly why Nero and Khan attacked Earth or its cities in the subsequent movies. But
Beyond showed that a Trek movie can do fine without needing to get anywhere near Earth. (Even the word "Earth" was only spoken twice in that film -- McCoy calling Uhura "an Earth girl" and the
Franklin being called an "Earth ship.")