In Italy the PM is not the Prime Minister but instead the President of the Council of Ministers. This means that he cannot change a Minister and he has not the last word on who is chosen as minister. Is more like "primus inter pares".
RULES
According to article 92 (link in italian) of the Italian Constitution, the PM is chosen by the President of the Italian Republic. The ministers are chosen by President of the Republic in agreement with the proposal of the PM.
Those are rules.
PRACTICE
Then comes the practice and "tradition". Usually the President of the Republic listens the representatives of all Parties inside the Parliament ("consultazioni" phase) to check if there is the opportunity to build a majority. Sometimes there are no chances to build a political majority: in those cases the President of the Republic can choose for new elections or keep working to find a consensus among MPs.
Most of the cases of italian PMs that were not an MP were chosen due to incumbent crisis: in those cases the President can find a person of high profile that can guide the country outside the crisis.
Example of that were:
- Ciampi (1993, was the first case of PM-not-MP) - manage the transaction after the Mani Pulite corruption scandal,
- Dini (1995, was the first italian 'technical' gabinet where none of the ministers was MP) - need to bring the country to elections ASAP.
- Monti (2011, due to debt crisis) was a "strange" case: until few days before becoming PM, he was appointed as lifelong-senator. So he lead a "technical cabinet" but he was technically a MP.
- Draghi (2021, if he will be able to create a cabinet) - health and economic crisis due to Coronavirus.
A rare case is the one of Renzi (2014): he wasn't a MP but he was Secretary of Democratic Party, the main-party of the majority.
Another case is when a coalition is built after the vote, creating a conflict on who will be the PM. A way to get out of mess, is to find a third person that will harvest agreement from all parts inside the coalition: this was the case of Conte (2018-2021 with two different coalitions).
Below I show the lists related to last 30 years (the political habits and tradition before 1993 was totally different and I think is not useful to put that time inside this analisis).
PMs that were MPs since 1993:
- Gentiloni 2016-2018
- Letta 2013-2014
- Monti 2011-2013 (He was an independent, but became Lifelong-senator just before PM)
- Berlusconi '94-'95 2001-2006 2008-2011
- Prodi '96-'98 2006-2008
- Amato '92-93 2000-2001
- D'Alema '98-2000
PMs that were NOT MPs since 1993:
- Conte 2018-2021 (Independent)
- Renzi 2014-2016 (Secretary of the Democratic Party)
- Amato 2000-2001 (he was PM and MP in the '92-93)
- Dini '95-'96 (he was director of Banca D'Italia)
- Ciampi '93-'94 (he was governor of Banca D'Italia)
Source: List of PMs