Two unrelated words: 'contest/equal' from Old English 'gemæcca' (companion), 'fire stick' from French 'meiche' (wick).
A contest in which people compete; a person or thing equal to another; a thin stick for lighting fire.
The 'equal/contest' sense from Old English 'gemæcca' (companion, mate, equal), from Proto-Germanic *ga-makōn. The fire-lighting sense (1530s) from Old French 'meiche' (lamp wick), from Latin 'myxa' (wick). Key roots: *makōn (Proto-Germanic: "to fit, make equal").
'Match' (contest) and 'match' (fire stick) are completely unrelated words that happen to be spelled the same — one Germanic, one from Latin via French.