Why do LEGO bricks keep their value even though they are still being produced?
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.