It's a mix of branding, recognition and risk avoidance.
From a creative view there are tonnes of reasons for replacing Ash, but remember, this is a show that's governed by more than just creative decisions. Ash and Pikachu are an iconic duo and arguably the franchise's most recognisable symbols (Pikachu more so than Ash, but Ash has been on TV every week for the past two decades, and that shouldn't be underestimated). The anime is "their" story and by replacing them they would be ending that story, and therefore ending the anime before replacing it with a new one. I know plenty of people wouldn't be too upset about that, but there are risks.
One is the inevitable viewer drop off. A lot of current viewers are still in it for Ash's journey and once that journey ends, their interest will end as well. Even if they replace him with an interesting protagonist, not everyone will be willing to invest in a new character and story after 1,000 episodes. Ash serves as an important bridge between seasons, especially during a period where each season is bringing about more radical changes. While everything else changes, the series can retain some of its fans by keeping around a familiar face and dangling the promise that his journey will continue.
For instance, a school setting is a tough sell for people who want to see a traditional Pokemon adventure, but if you put Ash and Pikachu in there, they might convince fans to give it a chance when they wouldn't have otherwise. If they had put a new protagonist in place, the series might draw some new fans but will simultaneously repel a lot of returning fans. On a related note, it may also be easier to get advertisers and sponsors on board if you have Ash and Pikachu still there instead of two new characters. If I'm a sponsor and I see Sun and Moon being a radical departure from the norm, I would have been concerned about viewer drop off, but having Ash and Pikachu there would have allayed some of my fears because I know they'll draw eyes to the product.
The flip side to this is that replacing the protagonist after so long could create a buzz and give the franchise the opportunity to re-position the anime in the current market. The danger there is that a lot people are inherently resistant to big changes. Misty leaves, and there's a backlash and controversy before AG's first episode even airs. Sun and Moon is revealed, and there's a backlash and controversy before it's episode airs. These things may recover over time, but businesses will want to avoid too many controversies regarding its products. The big problem Pokemon has is that its fanbase isn't conditioned for big change. They change the odd character and the location, but huge changes to the foundation aren't welcomed. You need only poke through forums etc. to see just how many people want the same thing from before.
I've no doubt that idea of replacing Ash has been floated a few times over the years, but by this point it'd be such a seismic change that they're understandably reluctant to do so. It's something that'll only happen when people really start losing interest.