Children bully others generally because of a low self esteem and projecting their shortcomings onto others. This way the attention is off of them and onto the other person. Another reason is that some children mimics this behavior if they observe it done by some of the more "popular" kids. They may not want to be seen as non conformists and side with the bullies.
The behavior can also be opportunistic. If the bully is not consequented and held responsible for the behavior, it would persist.
A bully may have been bullied at home by a sibling or a parent and displace their anger onto others.