Is there a reason why many famous paintings and artists use pigments instead of dyes as colorants? Some pigments are quite expensive and I am not sure why artists chose them over dyes, which are usually cheaper.
While more historical artists likely didn't understand the chemical processes behind the behaviors of the two options, the biggest reason is permanence.
Dyes are organic substances that are either soluble in their medium or in their application. This means the structure of it breaks down as part of the application. The structural breakdown, coupled with the organic state is ultimately why dyes are less permanent.
Pigments may be organic or inorganic, but do not break down in their binder or application. Because the structure of the pigment remains intact after application, their application is more permanent assuming it continues to adhere to the surface of the support.
I'm sure that a fair number of artists initially tried dyes over pigments, but in time the knowledge of the behavior differences would have spread from teacher to student. For practice, many may have chosen dyes, but when it came to important works, not likely. Bearing in mind that the expense of many pigments was often born by patrons of a number of the artists, so quality was very likely more important than cost.
It's also worth noting that the extremely expensive pigments, such as lapis lazuli used to make ultramarine, were often reserved for the most important of subjects such as very wealthy nobility or religious works. Less expensive pigments would be mixed for close approximation in other cases.
Most artists used the best materials for the job they could afford.
While dyes were often cheaper, you would often know that they would lose colour in the next few years, while pigments were often known to hold colour for a long time.
But all painters were limited to what they could get and could afford so some would have gone with dyes and their faded pictures might be still on walls. The well known paintings of old are more likely made with the better materials and withstood the time better and are now more famous.
As I understand it, dyes work via chemical reactions with the materials around them--the type of carrier liquid, chemicals within that carrier liquid, the material that they are being applied to, the atmosphere, etc. That means that it is much more difficult to ensure that you can get the same color from one day to another with dyes. You mention indigo--when you first pull something out of a indigo dyepot, it is a sort of yellow-green color, and it has to undergo oxidation to change to blue. I don't know this for sure, but imagine that different carriers with different viscosity (linseed oil vs. water, for example) could impact the oxidation process and limit how well indigo would work with oil painting, for example.
As @John Cavan stated in his response, pigments do not break down in their binder, which means that the colors that they produce are much more stable from use to use. I would imagine most artists would prefer that level of predictability when selecting colors for a painting.
The existing answers all seem to focus on stability and longevity. That's all true, but I think a more fundamental reason is suitability to the task of providing specific, desired colors where you want them.
Dyes are transparent. They add their color to the color of the surface they're applied to. You never get the pure color of the dye, the color is always affected by the surface color (including white), no matter how much dye you apply. The color is also affected by other characteristics of the surface, like how absorbant it is.
Pigments are opaque. As long the surface is covered by the pigment, the color will be exactly the color of the pigment. Pigments allow you to get precise and predictable colors regardless of the surface you're painting on.
You can observe the same issues with inkjet printers.
- Pigment-based inks produce saturated, vibrant colors that look like the ink, regardless of the paper (although the overall appearance will be affected by the color of the paper that shows through any gaps). A person could paint with pigment-based ink.
- Dye-based inks can look good on optimized media like photo paper, but even the best inks and printers can produce very disappointing results on regular paper. Also, dye-based inks don't lend themselves to painting by humans because the liquid form often don't look like the end result. The inks are calibrated so the printer can use mathematical formulas to apply the right amount of the right inks to produce a specific color. But using the inks to produce a desired color manually by eye requires trial and error on disposable duplicate media.