This is a complex topic, but I do have some ideas about it.
An important observation is the argument rules selected for by participles. Consider "singing man" vs "sung song".
As it turns out, past participles select for absolutive arguments: objects/patients of transitives (leading to passives like "the song was sung"), and subjects of intransitives (leading to perfectives like "I am left"). The passives presumably developed out of stative resultatives ("the window is (currently in a state of being) broken"), and then grammaticalized as passives through that usage.
The transitive/intrasitive split for HAVE vs BE auxiliaries for perfectives is still found today in several Indo-European languages, including German, French and Italian. It was also found up until around 200 years ago in English, and also in earlier Spanish as well.
But then the auxiliary HAVE generalized to be used for all verbs, whether transitive or intransitive. Originally, perfectives with HAVE as an auxiliary came from a different source, namely transitive constructions with a sort of possessive sense of a stative description like "I have the window broken", parallel to "I saw the window broken". This word order apparently still exists in Irish English, for example. Notice that this usage still originally comes from the absolutive alignment of these participles, and the agent— an ergative argument— is introduced as an additional, external argument, only then associated with the verb/participle after grammaticalization when a new argument structure has come about.
So the surprising pattern here is that of ergative-absolutive split in auxiliary selection, in contrast to typical nominative-accusative case marking in Indo-European. This is almost certainly also why the constructions have eventually shifted to use only HAVE for perfectives in English and Spanish, leaving BE for passive usage. (Now HAVE is nominative, while BE is accusative.) This may appear to be an unexpected analysis, but it also seems to fit.
Interestingly, Basque has something very similar, although it is a language with substantial ergativity in general, unlike its Indo-European neighbors. Some have actually proposed that the participle+auxiliary constructions might be due to Basque influence, but there doesn't seem to be any compelling historical sociolinguistic argument for how that would have actually happened! Instead, it's probably just coincidence, although interesting nonetheless. There does seem to be some kind of complex drift and contact situation going on throughout Europe, but the exact details are still debated, such as why Germanic and Romance are so similar. Some other somewhat similar patterns are also found in Greek, Slavic, etc.
For more about this, here is a presentation from a project on the topic a year or so ago:
http://publish.illinois.edu/djross3/files/2017/09/Ergativity-in-Europe.pdf