Actually it was not the Church that gave him an annulment. It was the Diocesean Marriage Tribunal. The decisions of the tribunal are not by any stretch of the canon, infallible. They are canonical decisions and subject to the same errors and abuses that plague civil and criminal legal decisions. So please do not blame Catholicism for poor canonical decisions made by CINOs.
To an outsider looking in your post is completely confusing. Doesn’t this tribunal operate under supervision of the hierarchy? You seem to be saying that the annulment process is somehow outside of Catholicism.