On the surface of it, there isn't a very rational in-universe reason to sacrifice Pegasus rather than Galactica. With the software vulnerability that began the entire series patched, one cannot even make a good argument that Galactica's relatively primitive, un-networked systems are preferable in the running fight against the Cylons.
We are therefore left to consider less-than-rational in-universe possibilities (after all, human beings do not always make rational tactical decisions); and several out-of-universe ones.
In-universe, Lee Adama clearly felt a need to redeem himself a bit, both from his desultory behaviour after the colonization of New Caprica, and from his insistence on not joining in the rescue effort that he did, in the end, join in. This could have led him to make a spur of the moment, "I'll show them!" sort of decision with his ship that, while not really very sensible, was in character for Apollo.
The truth is that Apollo was probably not qualified, objectively, to command a Battlestar. He had no experience in large-vessel operations, let alone command, and had probably not received much training in a formal sense, either. He received the posting through a combination of attrition and nepotism that everyone accepted at the time because there weren't a lot of good alternatives. However, his receiving that command was more or less the equivalent of taking a Naval Aviator and putting him in command of the USS Nimitz, without any additional training or time as a ship-side officer, and expecting him to know what he was doing.
In this case, Apollo did with his Battlestar what we've seen several times he'd been willing to do with a Viper -- put himself directly in the line of fire to protect others -- without thinking through the questions of whether Galactica would have served exactly as well and made more sense to sacrifice.
So much for in-universe speculation. Out of universe, there were two reasons that make a certain sense:
- The show is, after all, Battlestar Galactica. It probably wouldn't have confused the audience all that much if suddenly the namesake ship were no longer around -- by that point, most people watching the series were in it for the long haul, not tuning in randomly. But it still might have just felt wrong to the showrunners.
- The entire Pegasus arc is inspired by a similar, if shorter arc in the Original Series, which ultimately led to Pegasus being sacrificed so that Galactica and the fleet could escape. In that case, Pegasus went missing, and could conceivably have turned up intact later if the series had not been cancelled, but the basic point is that the source material also made Pegasus the sacrifice. In retrospect, this was not necessarily a brilliant idea in the Original Series, either, as Commander Cain's military experience was invaluable, even if he did disagree a lot with Adama, and he disappeared along with his ship. So there, too, it seems to have been an emotional decision by the commanding officer (in the original series, Cain) to err on the side of bravura without really thinking through the strategic repercussions.
In the end, the modern Battlestar Galactica series can be seen as one long parable of how humans and humanity often make terrible decisions and then have to live with them. In that context, the sacrifice of Pegasus, while not a strategically brilliant move, at least fits the theme.