TWTS: What's the "hap" in "haphazard"?

That's What They Say - A podcast by Anne Curzan, Rebecca Kruth

Some speakers have come to understand "haphazard" as "half-hazard," because who knows what a "hap" is.