It's usually a compromise between "most fun" and "flows best as a story". The best example is DAO: I feel that a Cousland makes the most sense story-wise, as they have the most tie-ins with the main plot, but I don't like playing a human if I can help it, so my Mahariel is my canon (and also my first). It helps that it's the only origin that has firsthand contact with the Blight and quite literally has no other choice but to join the Wardens if they want to live. She's a dual-wielding Spirit Warrior, romances Zevran and accepts the Dark Ritual. Hardened Alistair rules alone, Leliana stays softened, Bhelen is king, Circle mages saved, Architect dead.
My first DA2 playthrough was a diplomatic rogue, because I enjoy dual-wielding, but I feel that a mage makes most sense story-wise (also, Carver
) and that humour is the only way to deal with all the BS the game comes up with, so my canon is a sarcastic mage Hawke. She friendmances Anders and stands by him and the mages, even if she would've far preferred a less 'splodey outcome (and I headcanon that she plans to take him to Rivain or the Avvar to try to kick Vengeance out once things calm down). Carver is a Warden, Isabela finds her conscience, Merrill's clan lives, but she's the only one who is rivalled. Actually, I wouldn't have minded rivalling Fenris, Isabela and Sebastian, but the system's not flexible enough for that. As in, Hawke supports mages, but not slavery or blood magic, so Fenris' approval wins out. She doesn't like Sebastian or his endless waffling, but she's not power-hungry, so Sebastian's approval wins out. She doesn't appreciate selfishness, but does approve of finding your own path in life, so Isabela's approval wins out.
As others have already said, DAI also makes the most sense as an elven mage to me, so my mage Lavellan is my canon (and also my first). She's a KE, as befits an elven leader, and got her heart broken by Solas. Allied with the mages, pardoned the Wardens, reconciled Celene and Briala to help elves out, made a softened Leliana Divine and disbanded the Inquisition, both because she genuinely felt its job was done (heck, I would've disbanded it earlier if the game had let me!) and because she feels it gives her a more stable base to counteract Solas' plans. Rainier has been pardoned, Hawke is alive, Cullen is clean, Bull is Tal-Vashoth and Cole is human (because, after discussing with Hawke, Lavellan is fully aware of the dangers of a spirit remaining in the mortal world with a spirit's outlook).