I think this family had a long history (possibly of Catholic background) as a previous Court case also ended in excommunication.
No, not Catholic. These cases were heard by the Bishop’s Court of St David’s, which is part of the Established Church in Wales.
The purpose of church courts was to maintain spiritual discipline amongst the clergy and parishioners, hearing cases that offended against Canon Law. These were usually offences of a moral kind, e.g. defamation, fornication, marriage disputes, retention of tithes etc.
Excommunication was a common punishment for contempt of court, but offenders could later be absolved and restored to the church community.