I've found that women also engage in this type of affection, though certainly they are more able to show affection in other ways to those they care about. I’m guilty of it myself. Sarcasm is a hard habit to break. In general, I've found that people use this ironic approach to giving complements when they feel it is too awkward to say how they really feel. In other words, we are afraid of the mushy and the intimate, especially in public. (I cannot speak for how men talk to each other one on one.)
What’s interesting about that is that it seems to be a culture thing. Our fear of affection is reflected in the way we interact physically. In America we only kiss and hug family and close friends, and even then such affectionate displays are mostly initiated by women. When friends get together, often I see everyone hugging everyone except the men, who shake hands—even with family! I will not judge if this is good or not, but compare it with Europe, places in South America, and Russia (and probably more places that I don’t know about) where it is in the culture to greet one another with a kiss. In Japan, males are even more free with each other physically. They sit on each other’s laps (even in class sometimes), they walk down the hall arm in arm or over the shoulder. They even hang out in a hug from the back (with arms over the shoulders to the front, like a parent over a child maybe). None of this is sexual as far as I know, though I’m sure any male from America would quickly label it as such, citing their purple pens with tassels and pink stuffed animals hanging from their pockets as further proof. Though physical affection between the sexes is not displayed at school and is often done sparingly in public, it is common for lovers to express their devotion by accessorizing in the same way. Usually, it has what we would call a more feminine bent.
I can’t speak Japanese, so I don’t know what they're saying to each other and I know that there is some bullying that goes on, but at first thought it seems to me that a society where males and females are free to express both masculine and feminine qualities could be a healthier society. Of course, I still hear that women are viewed as inferior and have problems here, but I don’t know much on that topic. I will add that I don’t see grown men acting in the way I’ve described the boys doing, but I’ve only really seen grown men at work where everyone (even students to a certain degree) maintains a very professional exterior. I hear at parties it’s quite a different story, but I haven’t been to a school party yet.