Why are some paintings under glass in museums and others not?

Due to different manufacturing technique and value
Traditionally, oil paintings are exhibited without glass. The painting is usually covered with a clear varnish, which makes it resistant to impacts and allows wet cleaning. Graphics are usually exhibited under glass, as pencil, watercolor, ink and pastel are easily damaged and almost impossible to clean.
In some cases, oil paintings are also protected with glass. For example, against UV fading or when cracks in the paint prevent wet cleaning, as well as in cases of special value and the threat of vandalism.