Why have the characters take a Stand at all if God ends Flagg?
First, I have to say that I commented on the books, not the movie. But I liked the movie well enough as well, so...
When good and evil are at war (Good vs. Evil), the fight is to conquer the other, not any other outcome.
Flagg wasn't Evil; he did evil and was the product of evil, the user of evil, the personification of an evil.
Just like Mother Abigail wasn't Good; she was good and did good. Etc.
Mother Abigail's death doesn't end good any more than Randall Flagg's death ends evil.
In short: the fight was over the principle of good vs. evil.
(I do hope that made sense.)
Mr. King says he wanted yo write an epic like Lord Of The Rings, but in lord Of The Rings it was the characters that put an end to Sauron and the One Ring, not an all powerful deity.
Tolkien and Stephen King are VERY different writers, with VERY different methods and inspirations, so I don't think The Stand and Lord of the Rings can really be compared like this.
Tolkien was a heavy duty Christian. So heavy duty that he frequently criticized C.S. Lewis for not being devout enough. His writings are inspired by his religion. They are Christian-themed.
SK's are not. They come from another place entirely -- and one I don't even want to guess at.
But comparing the two is like comparing Mother Teresa with the best and by far more prolific writer. Oh wait. that comparison doesn't really work...