Not all rug stains can be removed by just washing. Sometimes, stains like wine or coffee need special treatment.
This is specialist work that takes a lot of patience, as usually, stains have to be removed layer by layer, so the wool is not damaged. A specialist will know what intensity of solution to use or the kind of solution, as each stain has to be treated differently.
Ideally, the carpet should be washed thoroughly first, as the washing may either remove the stain or at least reduce the intensity. An expert will first ascertain what the stain is and then try small areas with the solution that he thinks will work. The solution is always applied inwards to the centre of the stain to avoid spreading the problem. In the end, it is best to wash the carpet thoroughly again to make sure all the solution has been removed from it.
I have tried to show the work that goes into this type of process in this video so it can be understood why stain removal can cost more than you expect at times.
I hope you find the video of help.