Grabbing the beak too hard or hitting a bird on the beak can cause serious injury and even brain damage. There is absolutely no excuse for hitting a parrot. Parrots are highly empathic, matching their energy with ours. A bird that is treated in an aggressive manner will respond with aggression. If a bird starts to bite, the owner is often told to punish him by putting him in his cage and covering it.
Parrots do have a sense of cause and effect but it seems to be immediate.
If the owner yells and screams as they grab the bird to take him across the room to his cage, this drama will be what has a long term effect of the bird. By the time he is put in the cage, he will have no idea why he is there. I guess I will never bite anyone again. This implies that parrots have the same sense of time that we do. We humans can regret the past and dread the future, but much of parrot comprehension seems to be based more on immediate association.