The cargo hold on a plane is pressurized. On dedicated cargo planes it can be depressurized to put out a fire, but you can't do that at high altitudes on a combi because the passenger cabin and the cargo area are a continuous pressure vessel. You wouldn't be able to deprive the fire of oxygen without depriving the passengers of oxygen as well. While they could theoretically use the oxygen masks, the risks of doing that are greater than just getting the plane on the ground.
In this case the crew did try to open a door at a mid-level altitude, but the air wasn't thin enough there to negatively affect the fire. They were just following the checklist for smoke in the cabin, which prescribed opening a door in order to clear smoke from a fire which was assumed to be already out.
At the end of the day when there's a fire, the last thing you want to do is climb. There are plenty of things that will not stop burning even if you climb to 30,000 feet (such as lithium batteries). Putting the plane on the ground and running as far away from it as possible is always the better bet.