When a title has its own election laws, it is bypassed/resets the inheritance, even if the laws are EXACTLY THE SAME as the top realm title, or the highest title of owner. So IE Male Preference can be added to all titles when you have confederate, and you can get what is basically primogeniture . The AI somehow seems to know this and uses it extensively . It also has a bit of a side effect on county inheritance; normally under primo main heir gets capital duchy + counties in it; 2nd son gets next duchy + counties in it. The bug seems to cause confederate to get very messy, where the 2nd son ends up inheriting quite a bit of counties but no ducal/king title. Its kinda funny to see it happen to AI, happens quite a bit in the Frankish kingdoms. The primary heir that got all the kingdom titles will have 1 or 2 counties and the 2nd heir will have like 8. 2nd Heir forms faction &/or presses claim, viva la revolution, 2nd heir is now undisputed king.
just to make it even clearer what this bug is, take a Frankish king as example. Very often they will get 2 - 4 kingdom titles. Lets say the king of francia has 3 kingdom titles; he has 3 eligible sons as heirs. What SHOULD happen under confederate is that each son gets a kingdom & all lands in it. Instead, with the bug, all the king has to do is add 'Male Preference' - the same as his primary title - to each kingdom for a very affordable (200 prestige? IIRC) cost. Now the 1st in line - the primary heir - gets all 3 kingdom titles. The 2nd and 3rd heir end up getting a bunch of counties. Now if they king went further and added the male preference law to every duchy title that he holds, the 2nd and 3rd heir end up getting the majority of counties. This is because they are no longer bound by ducal inheritance; normally they each get a duchy, then the rest is split evenly. Now each duchy ends up getting split, with the 1st heir usually controlling just the capital county in the duchy. ERGO, the primary heir ends up getting LESS counties than the 2nd OR 3rd brother do.