I know many avoidant people who would never have an affair, so I would say it can create deep unhappiness over time but maybe not a predictor of what they would do about the unhappiness?
I've been thinking about this. I consider myself at least somewhat avoidant, especially with men pre-affair. I don't think I would have had an affair even if I were unhappy in my marriage. There are a few reasons, probably not morals and character in the sense that DRSOOLERS is expressing it though.
The main reason I didn't have an affair is the health of my children. In my life experience, divorce and particularly divorces with blended families can be extremely hurtful for children of all ages. Affairs lead to divorce. I would avoid an affair in a marriage with children because I don't want to break up my family. You, or another WS, might have a different experience of divorce and blended families that isn't as negative. I don't think this is a male/female or age/generational thing by the way. I've heard other BS here express this thought. My mind has certainly changed on divorce and its effect on children after my WH's infidelity and reading further here. I'm talking about how I felt pre-affair.
So what happens in those marriages, both mine and my friends who feel similarly and are unhappy? We try with our marriages to resolve issues. We do seek secure attachment in other relationships. We just keep to relatively safe sources like family or same-sex friends in a whole variety of environments. Our marriages stay intact on our side at least until the children are well into adulthood.
How did we keep from developing an attachment to a male friend, ala "Not Just Friends"? Some of us were in extremely male-dominated careers. We all had experiences early in our careers that drove the lessons of NJF home, and we are cautious. Is that avoidant or strong boundaries? I don't know.
One story would be a friend who is about 5 years into her career. She's doing great. She travels a lot, including internationally to fun places for significant periods, and enjoys the work and partying/sightseeing with (male) co-workers and clients. One late night after everyone has left, she finds herself in a cute little cafe in Italy with a senior male colleague; and he says he's in love with her. She had no idea and gave no encouragement to her knowledge. She socializes with all these people frequently. Two weeks later, she finds herself in a public bathroom with his wife telling her that her marriage is in trouble and her husband is distant and asking if she knows if he's having an affair.
Another story is a friend who is in graduate school. She spends a summer doing research with her advisor. It's largely one-on-one. They work together, have meals together, camp out or stay in the same hotel together, and hang out at night around a campfire or sightseeing. He's a new PhD and not much older, but he's married with a young child. This is the primary research for her degree. She finds herself one night in the bar at a professional conference where she's presenting. All the other colleagues have left. He tells her he's in love with her and wishes his circumstances were different. Again, she has no idea what happened.
Both women put in significant work into their career. They don't know what will happen next. They can get blackballed. It's scary. No matter what, it's significantly more a problem for them. They(we) learn that no matter what, we are not one of the guys. We will never be one of the guys. We need to be careful. That is likely male/female. It may be age/generational.
Another thing I've noticed is that my husband and I interpret attention about our attractiveness or sexual innuendo differently. He will tell me about a situation where he feels complimented and flattered. He practically preens like a puffed-up rooster. I put myself in that same situation, and I would feel disrespected or uncomfortable, or even intimidated. I don't feel validated by that type of attention.
There's a quote from an old, old Cary Grant movie, Operation Petticoat, about women being protected by law when they are young and protected by nature when they are about my age. Maybe I'll feel differently soon. I guess I'm still wary, but that's likely leftover vanity.
This is a long way of saying that I personally feel it's about my goals and life experience and morals gained over a lifetime that support achieving my goals. There's a whole other question of why I don't feel empowered like Morbs to lean into my sexuality. I feel powerless or threatened instead. There would be a good case to say that I have likely had "pretty privilege" in my career and elsewhere in life. One of those stories was me. Is that temperament or experience? I can't even begin to define character.
Post affair, I'm probably avoidant in my relationships with women too. AP wasn't a friend, but she was in a peer in my social circle. Now I'm wary with them too. I think that goes beyond good boundaries.