It was absoute necessary to wipe everyone out! It was a brilliant move that worked well. If the remaining mafia heads were kept alive,they would start plotting a move to wipe out Michael becuase he was becoming too powerful, so therefore Michael's life would be in constant danger.

Also for business reasons: He wins all territories! wiping out moe green was a great move to set an example that the Corleones are coming to Nevada, so get out of his way! Plus Moe Green was siding with the Barzinis.

Michael is the man!