This research concludes that an elementary-school-age bully's motivation is status, gained by domination of a victim, but at the same time, they value affection of others of the same sex. It's not the motivation of the bullying, but it is something a bully has to take into account. They need to get their bully fix without alienating their buddies.
So they pick on kids other kids of the same sex don't like. Nobody cares what kids of the opposite sex think about it. The reason they pick on weak kids is that if they picked on popular kids, the bullies would become outcasts from their group.