It wasn't a mockery. He was angry and disgusted at how he'd been manipulated and used by his commanding officers and the First Order and was lashing out against his former masters. That's sort of what human beings do.
I get we're not going to see complex and layered emotional reasons why most Star Wars characters do the things they do, but even what we got with Finn after he realized he'd been fighting for the wrong side was adequate and showed he was no longer going to be the First Order's pawn.
This kind of thing happens in real life. One can mourn your former comrades being cannon fodder and still cheer when the bad guys get beaten, even if some of your old buddies fight for the bad guys.