Unless there is an answer in the director's commentary to the film (which I have heard but don't recall), the only decent answer may very well be @SSumner's comment to your question: "because Peter Jackson." But it would seem that Tolkien's description of the immediate aftermath of Sauron's defeat in the book might have provided sufficient inspiration for the more visually arresting scene of the ground opening and swallowing the armies of Mordor:
As when death smites the swollen brooding thing that inhabits their crawling hill and holds them all in sway, ants will wander witless and purposeless and then feebly die, so the creatures of Sauron, orc or troll or beast spell-enslaved, ran hither and thither mindless; and some slew themselves, or cast themselves in pits, or fled wailing back to hide in holes and dark lightless places far from hope.
RotK, Book VI, Ch. 4, The Field of Cormallen, p. 227 (HM 2nd Revised ed. 1965). While this could be considered speculation, Jackson likely viewed his representation of the scene as more dramatic, and more easily depicted on screen, than Tolkien's description of some orcs doing one thing, some orcs doing another, and some (not quoted above but in the text) desperately fighting to the death.