There's not any one purpose that applies to all people and all telescopes. But probably the most common reasons are to reduce (in some cases, diagnose) the negative effects of poor optics and/or poor seeing conditions -- regardless of one's opinions on the effectiveness of reducing the aperture for such purposes.
But there can be other reasons as well:
Some may want to see what can be accomplished with a smaller aperture telescope, or what is the minimum aperture necessary to see this or that, or how gradually increasing one's aperture from 1cm up to the dull aperture of whatever telescope one is using affects what one can see.
Some may find it beneficial as well as economical to use sub-aperture, white-light solar filters.
Then there's the simple joy of making your own aperture stops and experimenting with them.
I've masked apertures of Newtonian reflectors, SCTs, and refractors -- and not always for the same reasons. I've experimented with reduced apertures while using an essentially perfect apochrmat refractor and I've experimented with the effects of masking on telescopes (regardless of type) with poor, or less-perfect optics.
I once made a hexagonal mask to experiment with its use in double star observation. I've experimented with the use of a full-aperture apodizing mask (or screen).
Sub-aperture masks can be used to intentionally reduce the amount of detail one can see. This can be a less overwhelming way of getting started in the world of astronomical sketching -- particularly with the moon.
I made a series of careful Saturn observations using a very high quality 130mm apochromat refractor -- starting with a 1-cm aperture and moving up in 1-cm increments until I got to the telescope's full aperture. I took notes and made sketches. I started small so I wouldn't be tempted into thinking I'm seeing something that can no longer be seen -- which would be more likely if I had started at the full 130mm aperture and worked my way down.
I determined the smallest aperture at which I was able to see, just barely, the first hint of the existence of Cassini's Division (and I made the mistake of posting the result to an online forum where a so called "expert" claimed that I could not have possibly made that observation.)
So the "purpose" is all over the place. The purpose is determined by the individual. And for some (many? most?) there's no purpose (for them) to use an aperture mask.