Why does the word "hexadecimal" have the prefix "hexa-" if it has a base of 16, not 6?
Hexa- is the Greek prefix for the number six, from hex, "six"; cf. hexagon, hexameter, hexad, etc.
Decimus is the Latin ordinal number "tenth"; cf. decimate, decimal.
This hybrid construction hexadecimal is strange but often seen in English to mean "sixteenth" or "pertaining to sixteen". It does not exist in either Latin or Greek, of course.
In Latin, it would be sedecimus, "sixteenth", leading to English sedecimal.
In Greek, in would be hekkaidekatos, "sixteenth", possibly leading to English heccaedecatic; but derivations of such polysyllabic Greek numbers are rarely used in English. The prefix would be heccaedeca-, as in a heccaedeca(h)edron, a polyhedron with sixteen surfaces.
The prefix “hexa-” originally means six, it's “hexadecim-” that means sixteen. (Latin and greek had constructions similar to English for numbers between 13 and 19.) In computer-related usage, base 16 is very common, so the prefix for 16 has come to be systematically abbreviated “hex-” or “hexa-”. Since base 6 is never used, there's no ambiguity.