That's a good point. Jealousy and the sense of loss definitely play a role. When a friend gets into a relationship, some men struggle with the idea of losing their friend to the new relationship. They might feel left out or lonely, especially if they have difficulty handling being alone.
Either way is childish imo