Why do LEGO bricks keep their value even though they are still being produced? I am curious why prices of individual bricks do not decrease because of increasing number of bricks produced. As an analogy to currency, when some government is printing money, their value gets lower. But this does not apply for bricks. 

I don't think that bricks around the world are utilized in the same rate they are produced. Most of people know the value of that "toy" and don't simply throw them out when children don't play with them.
Banknotes and coins tend to have very little physical value relative to their face value.  LEGO bricks usually are valued more for their function rather than the material value. In most cases it would not be cost effective to buy LEGO bricks just for the material itself.

Well treated bricks can be handed down, generation to generation. A 2x4 brick made 30 years ago is virtually identical compared to one made today. A lot of construction toy brands hold their value over time.

Traditional toys lose their value as they no are longer fashionable or they wear out. A broken doll house might not be worth keeping but a LEGO set with a few missing pieces can still be built with spare parts or re-built into something else.

Individual bricks do actually decrease in value relative to the increased production, particularly soon after a new part has been released as LEGO introduce the part to more and more sets in different colours. This piece released last year is worth about 1/5th of what it once was when it was only available in two high priced sets. 

Certain parts also experience a large increase in price after they are discontinued as they consequently become harder to find. Some parts (rubber, electronics, cloth) deteriorate faster than plastic bricks.