Why Is a Longer Chain Always Considered the Canonical Chain?
The "longest chain rule" is the core of PoW consensus. It is based on the probabilistic assumption that the chain with the most cumulative Proof-of-Work (i.e. the most hashing power expended) is the one created by the honest majority.
This rule is what allows the network to converge on a single, shared history, ensuring that the double-spent transaction is eventually orphaned.