We humans have many kinds of relationships with each other. We can be lovers, parents, children, teachers, students, priests, parishioners, customers, suppliers, drivers, passengers, writers, readers, etc.
Jealousy can make sense in most of these relations. Jealousy is a fear that potential associates will choose instead to associate with someone else. I can be jealous that my kids will like their mom better than me, that my students may prefer other teachers to me, or that blog readers may prefer to read other blogs.
Role specialization is a robust way to limit jealousy. If dads have different parental roles than moms, then my kids could like me best as a dad, and their mom best as a mom, and I less have to fear that they will substitute her for me. If I teach a particular course well, then my students can like me for being good at my course, and others for teaching their courses well, and I need less fear that few students will want me to teach them.
We use role specialization a lot, to great benefit, in our business and work lives. And traditional societies greatly specialized their personal and family relations. Genders, ages, and classes all had distinct roles to play. Wives and mistresses were even clearly distinguished. Since we have today weakened such role specialization, we now have more scope for jealousy in our personal and family relations.
One interesting exception is friendship. While friends sometimes specialize into more particular friendship roles, like “golf buddy”, and we are sometimes jealous of others supplanting our friend roles, such as “best friend”, both of these tendencies are noticeably weaker relative to non-friend relations. So much so that when people try to talk you out of being jealous in some other area, they usually point to friendships, as in, “You can have lots of friends without jealousy; why not do that with lovers too?”
Why treat friendships so differently? My guess is that friends, more than other relations, function in large part to cement our position in larger social coalitions. As a social species, we play a lot of coalition politics, and in coalition politics one needs many allies who themselves have many other allies. For this function jealousy makes a lot less sense. If my friends have more other friends, that makes them better not worse friends for me, if their function is to cement my position in a larger social alliance.