Yes, why not. A car/a computer.
You clean your car inside, vacuum the seats and carpets, and remove old candy paper from the pockets in the side doors. It is absolutely not necessary to do so for the car to still drive. But it's nice not to be in a mess.
On a computer, you remove leftover files from uninstalled programs (MacOS does not do this itself), you may clear the cache once a month, so as not to have old files lying around and taking up space. Is it necessary. Not at all. One's Mac can work fine without it, but it's nice to know it's gone. Having said that - MacOS "doesn't delete junk itself" after all, when I can remove 7-10GB of junk files once a month.
However, it is still more socially acceptable to have a messy computer than a dirty car. But that's another story.