This can stimulate the breeding instinct as the box or bag may suggest a nest box. The male will react just as he would with a female that refuses to go to nest, he will attack. The male will nip his mate if she does not go to the nest box when a threat is present. He will nip you to send you back to the nest box or nip. He may see another person as a rival or threat and bites them to drive them away.
Birds often bite the ones they love the most.
I call these love bites. These love bites can be very hard and painful. The sound of birds breeding, territorial screaming, or babies begging to be fed can also trigger this aggression. These sounds stimulate breeding behavior and thus make the bird more testy and likely to bite. He will nip or bite any person or animal that comes within range of his territory.