It derives from the wargames which inspired D&D.
The 1971 Chainmail miniatures game which inspired D&D included a table for one-on-one combat, which determined hit or miss based on the attacker's weapon and defender's armor. This appears to be the origin of D&D's term "armor class", which referenced the Chainmail rules. The meaning appears to be similar to "classification", as in how to sort, rank, or group different things.
The term "class" is widely used throughout the Chainmail rules to refer to a category, group, ranking, classification, or type of things, including weapons, armor, cannons, heroes, wizards, elementals, and undead. "Class" is similarly used in the wargame Don't Give Up the Ship, where it is used to categorize different ships based on tonnage. This may have been a common naming convention in among wargamers in the 1970s.
The man-to-man combat rules in Chainmail provide a table to determine the roll required to hit, which takes into account weapon type vs armor type. Some armor types share a column in the melee table; e.g. leather and padded armor are functionally the same. The ranged weapon table refers to "Class of armor worn by the defender", giving a number to each of eight armor groups.
The original 1974 Dungeons & Dragons provides an alternative combat system which closely matches the Chainmail table, except that the number is now referred to specifically as "Armor Class", and it is higher level rather than weapon type which determines the number which must be rolled to score a hit.
Originally, then, "armor class" simply meant "type of armor worn", with the implication that some armor is better than others. Since most monsters do not wear armor, and there are other magical means of increasing armor class in D&D, the term "armor class" soon became decoupled from the actual armor types, and referred only to the to-hit number. However, it was retained largely out of D&D tradition, which has always kept a lot of archaic words and ideas as part of its flavor.