Similar questions but no answer:
On Linux, when two routes have the same metric, which one will be used? I found this is documented for Windows ("If multiple interfaces of the same speed have the same lowest interface metric, then, based upon the binding order, the default gateway of the first network adapter is used. The default gateway for the second network adapter is used when the first is unavailable.") but cannot find how Linux is handling this.
I guess the answer is in the code but it's not obvious.