The story
Compound of machine + hour, although, as with any such unit of measure (e.g., ton-miles, newton metres), the mathematical relationship of multiplication is simultaneously involved: X machines working during Y hours = X × Y = Z machine-hours.
Etymology from Wiktionary, CC BY-SA 4.0.