Token is a very old word, referring to
something that is a symbol or sign of something else. It could
be a pat on the back as a token or sign of friendship, or a
marked piece of lead that could be exchanged for money. It came
to mean a fact or piece of evidence that could be used as proof.
“By the same token”
first meant, basically “those things you used to prove that can
also be used to prove this.” It was later weakened into the
expression that just says “these two things are somehow
associated.”