Probably a mix of intimidation tactics (“we subdued the half-giant; aren’t we impressive”), making this extra painful for Harry (by the time he sees Hagrid, fleeing is impossible), or perhaps related to the more personal history Hagrid and Voldemort have together.
–
alexwlchanMay 22 '14 at 23:53

5 Answers
5

I suspect there may not be any canon answer to this. But here goes my take...

In-Universe

As a Witness
It is most likely that Voldemort was making sure that there was a non-Death Eater witness on hand to relay the death of Harry Potter and the circumstances surrounding the death to Harry's supporters.

Psychological Warfare
Another point as mentioned by DVK is to add an element of psychological damage to his enemies.

Voldemort truly believed in defeating his enemies, not only by physical means, but also using psychological means:

[Voldemort]: no man alive can threaten me now! Watch!
Crucio!”

Harry had been expecting it, knew his body would not be allowed
to remain unsullied upon the forest floor; it must be subjected to
humiliation to prove Voldemort’s victory.

-Harry Potter and the Deathly Hallows, Chapter Thirty-Six (The Flaw in the Plan).

Hagrid is impeccably strong, as well as a fierce and unrelenting member of the Order of the Phoenix. The message of "look, we've got your fiercest warrior and he is nothing but a puppet to us now!" is surely to strike despair into the hearts of his enemies; as we can see has happened to Prof. McGonagall:

... “NO!”

The scream was the more terrible because he had never expected
or dreamed that Professor McGonagall could make such a sound.
He heard another woman laughing nearby, and knew that Bellatrix
gloried in McGonagall’s despair. ...

-Harry Potter and the Deathly Hallows, Chapter Thirty-Six (The Flaw in the Plan).

Note that Voldemort was definitely not expecting to capture Hagrid and use him in this way, but he saw the opportunity present itself and used it to his advantage. As we see that he (Voldemort) was originally thinking of dragging Harry's body back to the survivors, but changes his mind when he realises that using Hagrid would have a greater impact:

“Now,” said Voldemort, “we go to the castle, and show
them what has become of their hero. Who shall drag the body?

No — Wait —”

There was a fresh outbreak of laughter, and after a few moments
Harry felt the ground trembling beneath him.

“You carry him,” Voldemort said. “He will be nice and visible in
your arms, will he not? Pick up your little friend, Hagrid. And the
glasses — put on the glasses — he must be recognizable —”

-Harry Potter and the Deathly Hallows, Chapter Thirty-Six (The Flaw in the Plan).

Kill With Meaning
You are incorrect in your assumption; Voldemort doesn't just kill for fun, or for no-good-reason at all.

He is extremely meticulous and cunning, and knows when to kill as well as when not to kill, as I've pointed out here.

Voldemort does not just want to annihilate the entire world along with the whole wizarding population. He is especially against the spilling of "pure-blood", but also knows that he must 'rule not kill':

“The battle is won. You have lost half of your fighters. My Death
Eaters outnumber you, and the Boy Who Lived is finished. There
must be no more war. Anyone who continues to resist, man, woman,
or child, will be slaughtered, as will every member of their family.
Come out of the castle now, kneel before me, and you shall be
spared. Your parents and children, your brothers and sisters will live
and be forgiven, and you will join me in the new world we shall
build together.”

-Harry Potter and the Deathly Hallows, Chapter Thirty-Six (The Flaw in the Plan).

Out-of-Universe

Right in the feels
JKR seems to be very fond of symbolism in her story. When we first meet Harry as a baby, he is carried in by (non-other than) Hagrid himself! and now Hagrid has to carry Harry's (apparently) dead body back to the throngs of onlookers.
(It truly made my heart melt when I read that part)

There's no canon info for what Voldemort was thinking; but it's possible it was for psychological value. (same as showing defeated and dead Potter to Hogwarts defenders). It'd be too much work to carry a dead Hagrid all the way out of the forest.

First, Hagrid is perceived as a blundering fool by Voldemort (recalling the time of Tom Riddle and Hagrid in Hogwarts), therefore, considers the half-giant not dangerous. The Dark Lord renders Hagrid immobile to avoid any complications.

Second, Hagrid is very close to Harry. The inflicted pain would be psychologically most debilitating if Hagrid can be used as a pawn in the transaction of Harry.
Finally, Hagrid is a half-giant. Giants were a part of the Dark army. There may be some considerations involved here.

In conclusion, I think Hagrid is not killed by Voldemort on account of its sheer irrelevance to the big plans of Voldemort.

The killing curse is expensive in terms of mana per pound of mass, plus a giant's magical permeability is at least two orders of magnitude greater than normal, so we can expect a half-giant's to be somewhere in the middle. Now, Voldemort does not need to do the calculations in his head to see that he needs to save his energy in this case.

JK doesn't mention all the technical details for good reasons, it might come in handy when Harry goes to the University of Magic in Bulgaria.