Lack of women can be a reason indeed. Low fertility (due to, among other reasons to game performance) can cause that deficiency. It is worse on game start where all available women are "caught" very fast and you then only have a choice among 0 year old babies to marry with. Courtiers and barons don't marrying also contribute to limited pool of characters to marry.Nobody has mentioned the reason border gore exists in the first place. It's not from random AI conquests, it's from random AI marriages. If they can fix the marriage system, it would help (not eliminate) border gore.
Specifically, who the AI choose for marriage partner should be based on their current needs. For example, they want an alliance with a neighbouring country if they're afraid of them, or they want their help in another war. The AI should not be seeking alliances half way across the map. Maybe they're doing so because there's not enough eligible women near them - well then that's the problem that needs to be fixed, too. Maybe the AI can learn to use the "find a debutante" action when they don't any suitable women near them.
Plus, the smaller a religion and culture is, the more limited possibilities are.
Present debutante is not ideal either since they won't the rank expectations for marrying most nobles.
Marriage itself could pursue various goals : alliances, inheritance -both being maybe more distance limited- , pure prestige/gold marriage -with maybe as counterpoint to not bring alliances or claims.
AI creating and handing out titles blindly also contributes to it (HRE f.e.). Encouraged by the vassal limit thingy (yet another -failed- attempt to avoid NK mode), AI inability to make logical choice when giving titles.