Although there's no specific confirmation in the film script or the book, it seems reasonable to assume that the Alliance troopers entering the base were able to hack the security systems to open the door remotely.
Note that just a few seconds after the doors open, they arrive en-masse.
The door opened to reveal a blood-spattered, but not noticeably
wounded, River Tam, holding a Reaver blade in each hand. She was
standing in a very big sea of Reaver corpses.
Several curses went through Mal's head, all of them woefully
inadequate.
Then Mal noted the grappling hooks in the wall, and was thinking this
whole thing might not be as over as he thought a second past.
Sure enough, the walls were ripped away with a crack that near
deafened Mal, to reveal a whole passel of Alliance soldiers.
River may've done a job with them Reavers, but she also cleared the
path for these more coherent folk.
Serenity: A Novel
As to why they needed to come through the wall, the simplest answer is that Mal and the gang had already collapsed the main passageway with their grenades. The partition wall was evidently the quickest way to get through to them.