Hap-hazard. In billiards it means playing for one thing and getting another. Hence an advantage gained by luck more than by skill or judgment. (German, glück, chance, our luck.)
“We seem to have discovered, as it were by a fluke, a most excellent rule for all future Cabinet arrangements.” —The Times.
Source: Dictionary of Phrase and Fable, E. Cobham Brewer, 1894