SheBear: The reason that they show up in the books (besides The Hobbit - in that case they are at first interested in what is going on in the copse of trees with the fire and the goblins singing and the dwarves and Gandalf and Bilbo, so they sweep down, pick up Gandalf, talk to him and then rescue the rest of the party, and then their historical hatred of the goblins is established and their friendship with the dwarves secured so that while it is a bit weird that they show up to The Battle of Five Armies it is no more strange than Beorn showing up - so while yes Gandalf is previously friends with the eagles here he doesn't directly call them).
In LOTR the eagles (particularly Gwaihir) act as messengers to some degree and then as agents of Manwe. The rescue of Gandalf from Orthanc by Gwaihir is - yes because he is told to go to Isengard by Radagast - but also because his purpose in Middle Earth is to be a winged guardian of the world, and so he aids the on Maia who is still performing his duties. Same when Gwaihir finds Gandalf after the fight with the balrog and brings him to Lorien. And same with the intervention at the Battle of the Black Gate: though then they serve as a convenient taxi service to go pick up Frodo and Sam.
Amazingly awesome justification in a book format...
and amazingly shitty for a movie. Seriously, how do you expect a director to actually communicate that shit to an audience that's never read the books or has done so once, ten years prior?
Movie pacing and format are different, just like video games and movies are different (seriously they aren't alike and video games that try and act like movies tend to suck, but I digress). With one simple and inconsequential change Jackson has both educated an audience on "why" it's happening and not deeply changed the role of the eagles in Middle Earth.
Yes, yes, if you know the back stories (which frankly didn't exist at the outset, you know as well as I that there's a lot of different versions of The Hobbit and most of the deep lore got retconned in during Tolkien's lifetime) like you do then you didn't need the device. Of the theater full of people maybe 5 of them knew it all, the rest did not or didn't remember because they only have a passing fancy with Tolkien's works.
One of my favorite parts of The Fellowship of the Ring is Tom Bombadil, I was kind of sad during that movie to realize that entire section would be skipped, but after seeing the entire feature I can understand why it was done.
Skipping Glorfindel just to give Liv Tyler more screen time actually did annoy me and I still don't agree with it. So it's not like I'm going to apologize for every single decision Jackson made, but seriously, most of them don't deeply change anything terribly important (and certainly no more so than Tolkien himself was fond of changing shit).
To sum up, the eagles looked flipping awesome, if I could have had that scene come to life out of the books as a child it would have looked exactly like that. I've been waiting to see that scene, in some ways, for over 30 years. I got to see it with my daughter sitting right beside me, it was magic.