SVG is an XML text format and can carry a lot of metadata, editor comments and redundant attributes that increase the size without any visual impact. Compressing an SVG removes these unnecessary elements (and scripts too, for safety), which can cut the file by 30-60% while keeping the visual result identical.