Voldemort got the giants on his side (other than Grawp) by promising them equal rights. The Ministry of Magic is very oppressive towards magical creatures, and this is intended by the author. Dumbledore points it out after he and voldemort wreck the wizard supremacist statue. So Voldemort is (dishonestly) promising equality to the giants to get them to revolt. The giants want equal rights.
So at the end of the last book, Harry kills Voldemort. And the giants lose their rebellion and go back to being excluded from society and denied the right to wands. And the final line before the epilogue is "all was well".
Rowling is savvy enough to identify problems in society, but she cannot write stories about solving problems in society, because she doesn't know how. She doesn't understand human rights. She never stood for improving rights.