This is called auxiliary selection. It came about in the late Roman - early Medieval period in the major Romance and Germanic languages, before being progressively lost in many languages through the late Medieval and into the Contemporary Modern period.
For the emergence of this distinction, it pays to go back to the Latin of the 9th century. The HAVE-perfect is outlined in other Linguistics.SE answers. The BE-perfect can be linked to the breakdown of the deponent - passive distinction. As stated by Drinka 2017:
Not only did the HAVE perfects flourish in particular contexts in Carolingian Latin, but the BE perfects also grew in prominence, in conjunction with the prolific increase in the use of deponent verbs. [...] Latin passives and deponents are formally identical, forming periphrastics with a BE auxiliary in the perfect and pluperfect.
These deponents became especially productive in Late Latin, beginning especially n the 6th century, and culminating in a crescendo of increased frequency in the late 8th and 9th centuries, precisely at the time of Charlemagne’s reign. Deponents came to be used so profusely that virtually all of them had active counterparts which substituted for them freely: the glosses demonstrate complete interchangeability between deponents and actives. It was the late profusion of both deponents and passives in Latin which promulgated the periphrastic BE perfects.
The closeness of the Germanic and Romance 'Standard Average European' sprachbund can be attributed to the various stylistic and sociolinguistic changes. However, each language developed the use of the periphrastic perfect to different extents.
Among those that have lost auxiliary selection in the perfect tense, we find the standard forms of Catalan, English, Portuguese, Spanish and Swedish, all in favour of the HAVE-auxiliary.
Based on the types of verbs that converted to HAVE-auxiliary, as well as the semantics of the verbs that have BE-auxiliary, there is the Auxiliary Selection Hierarchy (Sorace 2000):
- Change of location
- Change of state
- Continuation of a pre-existing state
- Existence of state
- Uncontrolled process
- Controlled process (motional)
- Controlled process (non-motional)
For those in the middle of this hierarchy, for languages that have the boundary around there, they have a certain amount of fluctuation, and the influence of the predicate becomes important. For example, for Italian, the 'change of state' nature of the first sentence selects BE, whilst the 'process' in the second selects HAVE:
La pianta è fiorita all’improvviso.
"The plant blossomed suddenly."
La pianta ha fiorito per tutta l’estate.
"The plant blossomed throughout the whole of the summer."
I will share this warning from Ackema & Sorace 2017 though:
Of course, it should be kept in mind that the possibility that there is a diachronic change going on does not affect the point that the synchronic grammatical situation should somehow be accounted for. (In this respect, it is interesting to note as well that the history of some Germanic languages, like Dutch and German, seems to be characterized by a development towards a more pronounced dispreference for a HAVE-alternant with some BE-taking verbs)
The paper continues to boil it down to a combination of semantics and syntax.
On the Slavic use of auxiliaries: this is mostly not comparable to its use in Romance/Germanic, as the perfect is based on the "l-participle", which is active, and BE is the only auxiliary. Even Macedonian, which does have the HAVE-auxiliary, doesn't distribute them across different lexical verbs, but is rather a dialectal marker (сум-perfect vs има-perfect, and then with different participles, according to Tomić 2006).