The only rationality that I can come up with is that he was ashamed of his “son” and doubted he would be able to have a force-sensitive child. As a result, he ignored his existence until it came back to bite his butt. But of course this explanation relies on the novelization where it states that her father wasn’t force sensitive. Would have really helped if all this was mentioned in the movie.
But yeah, you’re right, none of this was taken into consideration while writing TFA, let alone TLJ.