Not everything rare is valuable! An old book of beautifully illustrated prose might be extremely rare...but who wants to buy it?
Rarity IS one component of value.
What we consider is: How rare was it, when it was made?
Think of a triangle. At the top are works made with the finest materials, for the use of royalty, and upper classes. At the bottom: Things that were mass produced that were and are worth less.
Another consideration: What has occurred in the meantime that would make a work rare?
Some German Expressionist Art prints were geared to be shared by a larger audience. The Nazis branded them as degenerate art and burned them, and artist studios were bombed in WWII. Therefore there are much fewer works available today than were actually made. This rarity makes them more valuable.