Don’t we? I could be wrong but my understanding is that the glymphatic system works very well during sleep. Basically excretory process of the central nervous system
>The essential function of sleep may be its restorative effect on the brain: "Sleep is of the brain, by the brain and for the brain."[95] This theory is strengthened by the fact that sleep is observed to be a necessary behavior across most of the animal kingdom, including some of the least evolved animals which have no need for other functions of sleep, such as memory consolidation or dreaming.
I'm not sure I understand the distinction you're trying to make. There's not purpose in a volitional sense in evolution, only effects. We sleep because necessary functions occur when we do and problems happen when we don't.