This does not mean - strictly speaking - that the Church does not recognise the marriage (sometimes people say "not married in the eyes of God").
Clearly the Church does recognise it in a certain sense, if not then it would have no impact on the admissibility to the sacraments.
We do not encourage such arrangements, because the marriage should be seen as a public religious ceremony, indeed a sacrament, not just a moment of private and family celebration.
In those circumstances the Church generally refuses to give a dispensation for the marriage to occur outside the Church (allowable circumstances would be in the Church of the other (non-catholic) partner).There may be many reasons why a Catholic might have married in a registry office. Or sometimes family circumstances - such as difficult relationships between family members.In times gone by it might have been because the bride was pregnant, or because the families disapproved of the union (and the couple went to Gretna Green).I think the Anglican practice has changed a lot now so that such unions can take place in Church.It may be the case, of course, that the same procedure may be followed in the near future for same-sex couples, where the Vicar is inclined to bless such a "marriage".