There are 4 classes of cargo compartments listed in 14 CFR 25.857 for transport category airplanes. The main concern with in-flight access is in regards to fire safety.
- Class A: Crew will easily discover fire from their station (and therefore be able to suppress it as well)
- Class B: There is a fire/smoke detection system, and access for crewmember to use a hand fire extinguisher
- Class C: There is a fire/smoke detection system to alert the crew, and a fire extinguishing/suppressing system installed
- Class E: For cargo-only aircraft (no passengers): There is a fire/smoke detector, and a way to shut off air flow to the compartment
So basically, there has to be some way to both detect and address a cargo fire. Class A compartments are those such as in the cockpit where a detection system is not necessary. It sounds like the ATR example would be Class B, since they had a fire indication, and the crew had access to extinguish the fire themselves.
In larger planes with cargo in the lower hold, the compartments are usually Class C, so they have a detection system and a suppression system, and in-flight access is not required. As David Richerby's answer notes, the compartment may be accessible, but that doesn't mean that crew could effectively locate or fight a fire in those areas. Especially for large cargo holds, a fire suppression system installed througout the hold is much more effective than crew members gaining access at certain locations. This also provides the benefit of isolating the main cabin from the fire extinguishing agents.
Besides fires, there are even rarer instances where cargo compartment access could be helpful. But even in that case, it was better for the plane to just come back and land to access the cargo compartment.