Can you explain the rationale behind age recommendations for various Lego products?

For example, what makes a 4-7 rating different from a 6-8? Is it unreasonable to buy a set labelled 12+ for my very advanced six year old if I will be building it with him?

Is there some guideline that explains the complexity or number of pieces? Is it related to the durability of the finished project?