Just like a comma in writing creates a brief pause and separates phrases, a rest in music creates a brief silence and separates musical phrases or ideas. It allows for a moment of breath, emphasizes the notes around it, and helps guide the listener through the music.
While other notes could be compared to different punctuation marks (e.g., a sharp could be like an exclamation point), the rest stands out as the most direct analogy to a comma.