i think a pairing happens when you get an A support with them first. so for example if petra and dorothea had A support before with anybody else but dorothea got an A support with sylvain next she still ends up with petra in the epilogue. that's just what i noticed in my 3 playthroughs.
ALSO am i the only one who noticed that every female support with Ingrid goes a lil gay for her? and this comic is canon cuz she kinda went gay only for mercedes lol