I see you didn't even read the first paragraph of your link ...
Excommunication (Lat. ex, out of, and communio or communicatio, communion -- exclusion from the communion), the principal and severest censure, is a medicinal, spiritual penalty that deprives the guilty Christian of all participation in the common blessings of ecclesiastical society. Being a penalty, it supposes guilt; and being the most serious penalty that the Church can inflict, it naturally supposes a very grave offence. It is also a medicinal rather than a vindictive penalty, being intended, not so much to punish the culprit, as to correct him and bring him back to the path of righteousness. It necessarily, therefore, contemplates the future, either to prevent the recurrence of certain culpable acts that have grievous external consequences, or, more especially, to induce the delinquent to satisfy the obligations incurred by his offence.
Jesus also said: "As you judge, so shall you be judged.".