No, nothing to do with legality, but it would mean the Heinz-Kerry's are not married in the church, in spite of being such "devout" Catholics.
As I understand it, lots of prominent Catholics have been through this process, including several Kennedys. The first marriage can be annulled, even when several children have resulted from it, and the second marriage then be declared valid in the eyes of the Church.
To the non-Catholic, such as myself, the entire process looks like a hypocritical end-run around the no-divorce stance of the Church, as it it time-consuming and expensive and therefore not readily available except to the rich and well-connected.