Extreme events such as rogue wave in optics and fluids are often associated with the merging dynamics of coherent structures. We present experimental and numerical results on the physics of extreme events appearance in a spatially extended semiconductor microcavity laser with intracavity saturable absorber. This system can display deterministic irregular dynamics only thanks to spatial coupling through diffraction of light. We have identified parameter regions where extreme events are encountered and established the origin of this dynamics in the emergence of deterministic spatiotemporal chaos, through the correspondence between the proportion of extreme events and the dimension of the strange attractor.