One of the basic needs of all human beings is to belong. For children, receiving attention is a sign that they belong. Most children believe if they cannot get attention, they do not belong.
Children generally repeat behavior that gets their parents' attention.
If you notice cooperative behaviors, children are likely to repeat them. If you notice irritating behaviors, children are likely to repeat those as well. Many parents have trouble seeing good behavior. Sometimes that is because there is little good behavior to be seen. More often it is because parents aren't used to looking for good behavior.