Are you sure? If I said " Everything has its reason", "its" would not refer to reason, it would describe reason, but refer to "everything". I would be very surprised if it were any different in German. I.e., if your logic were correct, wouldn't you then have "Die Geschichte hat seinen Sinn"? I am certain it should actually be "Die Geschichte hat ihren Sinn"
German speakers: could one of you please explain why "seinen" is used here. I would understand if the sentence were "Jeder hat seinen Sinn" since "jeder" is unquestionably masculine. However "alles" is "all/everything", so I would expect it to be either plural or neuter by default.
Could one of the mods clear this one up please. There are at least 2 views i.e. that 'seinen' is masculine as it refers to 'der Sinn' or that seinen actually refers to alles (with no explanation of why it's masculine). I had the same question as the others but don't see any reliable/definitive answer as to why 'seinen' is used and whether it refers to 'alles' or 'der Sinn'