High-energy astrophysics

Why can a detector use Earth’s atmosphere to study some very-high-energy gamma rays even though the atmosphere blocks direct gamma-ray photons?