I am wondering how babies learn to cry when you take away something from them.

i.e. My daughter, she would play with something and I take it away, she would cry. Where do they learn that? At this early age? Where do they learn to be dissapointed? Do they learn this from us or it's part of human nature?

She is one year old btw.