More specifically, I have noticed that on several of the aircraft of Blue Panorama Airlines, even though they are an airline based in Italy and the Italian flag (together with the EU flag) were on each of the aircraft's tails, they all had an aircraft registration prefix of "EI", which is obviously the prefix for Ireland. 

1. Why do the flags and registration prefixes contradict?
2. Even if there is a reason for that, why does an Italian airline have aircraft registered in Ireland?