It would be kind of a useless statement to point out that Black Sabbath and Cake are very different musical entities. Cake is in a realm of their own, which partly the fun of watching them do covers. The bring disparate influences like Gloria Gaynor, Frank Sinatra, and here Ozzy & Co, to their slacker alt rock BBQ.
It's no surprise to me that this works. When you're a band like Cake, who really knows their style, you can transform almost anything to fit your needs. "War Pigs" is an early metal cut from before the genre had really reached the limit of its tropes, so it has a debt to earlier forms of hard rock and heavy blues. It's that lineage that Cake is able to bring out of it and exploit. And just like Ozzy always seems a little dead, John McCrae always sounds a little tired, so the adaptation works.