I’ve been meaning to start a topic on this subject so thank you for starting this.
I believe that krita does not release RAM when it would be possible to do so.
A example of this is when you have multiple images open and do work on them all and the RAM (as measured by the operating system) keeps going up and up to a very high level and swapping does not happen.
If you then Close some of those images, the RAM does not go down.
As you do work on a single image, the RAM keeps going up beyond that on the status bar. One way to deal with this is to Save the image and then quit krita and restart it and open the saved .kra file. That does get rid of the excess RAM usage as you might expect.
One possibility is the amount of RAM needed to store all the Undo image data which could be quite high if you delete large layers with complex image content. That’s just my theory and it would need one of the developers, such as @tiar or @halla to give proper thought to this.