My guess is that, at first, humans just had sex when they felt like it and sometime the woman got pregnant but when is it that they realized these two things are linked.
I'm pretty sure this predates recorded history