Generally speaking, they do things like that in order to garner your attention because they feel it is lacking at a given moment.
I have found that a mix of paying attention to them at times and at other times punishing them seems to result in a relatively well adjusted pokebeast.
[voice]
I have found that a mix of paying attention to them at times and at other times punishing them seems to result in a relatively well adjusted pokebeast.