It is based on how we think the world should be and how we think people should act. When things don't go the way we expected them to, it simply means that our interpretation of reality was faulty. It tells us that we don't understand reality as well as we thought we did. In other words, our expectations were unrealistic. A more intense form of disappointment is bitterness, which tells us that not only did we expect something, but we started to count on it or depend on it.
Many people use the expression of disappointment as a way of laying a guilt trip on someone else.
The parent who does this doesn't realize that they simply did not know their child as well as they thought. Turning it into an opportunity to lecture the child will hurt the child's self-esteem by causing him to feel like a failure. A smarter thing for the parent would be to let the feeling provide an opportunity to get to know the child better, as well as the circumstances surrounding the child's life, and the way the child makes decisions based on his or her values, beliefs, and needs. The same idea applies to friends or romantic partners. A more positive form of the same emotion is curiosity.