There are a range of reasons for overseas registration.
All the Boeing/Airbus aircraft in Russia registered overseas (Bermuda is a favourite, but Ireland also) are due to an import tax on non-Russian manufactured aircraft, which this avoids.
In Italy, and some other places, bankruptcy laws can leave a big liability to leasing companies if the airline goes bust.
Elsewhere just the legal logistics of getting aircraft out of the country again if the lease is not paid on a domestically-registered aircraft causes it.
Some countries have regulatory issues with non-national pilots and/or licences which it overcomes.