Oh, well there's a short version and a long version, but I think the former is probably better for this scenario.
Essentially the Servants themselves aren't the main aspect of the Holy Grail War based on the Fuyuki Grail (so far the only one shown to employ this method... and this isn't the actual Holy Grail from Biblical and Arthurian Lore, but a modern imitation or fake made by makes in their attempt to perform high-thaumaturgy), but what lies at the core of the Grail War is the... well the Grail. At this point we can even go further and differentiate between the Lesser and the Greater Grail, but let's leave that out for now. All that matters is that in 1790, three powerful mages came together and created an incredibly complex and powerful Magical Ritual which would allow them to amass incredible amounts of magical energy which they could use to summon and materialize the souls of Heroic Spirits in order to use them as batteries. You see, the true purpose of Servants is actually just to feed the Grail and fill it with enough energy so that it can eventually gain enough power to break through to the Root... another pretty complex term that basically amounts to the Akashic Record if you are familiar with it. If not then don't worry about it since it's a bit of a long story, but essentially whoever reaches this "Root" will gain unimaginable powers like the True Magics, which include Time-Travel, Travel between Parallel Universes, the Materialization of Souls, etc.
Well that, or they could do god know what while in contact with what amounts to the very core of the Universe. It's a place that exists outside of time which stores and archives information of all possibilities and events, past, present, and future, so some mages just want to reach it find the "truth". After all, once in contact with such an almighty... thing, you could literally ask it ANY question and you'd get a definite answer, so consider that thing to be Be All End All of the universe.
In any case, so long story short: Servants are Heroic Spirits summoned by the Grail to serve as its batteries so that it might gain enough energy to reach the Root.
The Servants don't know this of course, and neither do most Masters (aside from the core three families that started this to begin with), and all they know is that "If I win this competition I'll get a wish granted, yay!", while being utterly oblivious to the true objective of the Ritual. So yeah, the Servants are pretty much screwed since they only exist to die, and the easiest way would just be to order them all to kill themselves at the same time and wrap this thing up, buuut just because the Servant's wishes can't be fulfilled doesn't mean that Master's can't. They obviously want that treasure all for themselves, so they use their Servants to kill everybody else until they are the last ones remaining, seeing as Heroic Spirits make for much better weapons than any gun or nuke could ever hope to be.
But again. Most Masters don't know about this, so they're usually just in this to get a wish fulfilled.
Oh, and one last thing. Just because the true purpose of the Grail is to punch a hole through the Root, doesn't mean it can't fulfill wishes. It's still perfectly capable of making you rich, famous, handsome, or any other basic wish you can think of. At the end of the day it's still a huuuge cauldron filled to the brim with magical energy, so even if there's still some Servants left that haven't been killed yet, you could technically just sneak in and get your wish granted anyway. So yeah, you basically have an incredible amount of magical energy at your disposal to wish for whatever you want, so as long as it isn't anything impossible, it should be able to grant most "normal" wishes, though I think for something like true reincarnation or attaining godly powers you still need to beat all 7 Servants, but take that with a grain of salt. Nobody actually ever won a Grail War in the main Fate Series, so it's hard to really know the details xD