Updated to include passages in Jer and Matthew
(rather than just citations)
Source of Defilement
From the point of view of the first husband, the woman slept with another man after she married him, so there is defilement in this sense. Note "defiled" is a euphemism for calling the woman a prostitute. (Lev 21.7, 21.14).
Suppose this law was not in place -- you could have wife swapping parties where you divorced someone, they slept with someone else, and then you remarried them. You could even sell your wife for a night. I know, I know, the Israelites would never use a legalistic interpretation of the law to go against its spirit, but in theory something like that might be possible by unscrupulous actors.
Note that she could remarry him if she didn't sleep with someone else. Thus contra other commentaries, it is pure wishful thinking to suggest that somehow the husband is responsible for the defilement, since the key event that prevents remarriage is someone else marrying her (e.g. having sex with her) not the divorce itself.
But once she does sleep with someone else, the original marriage has now been violated, and she is viewed as defiled in the first marriage with her husband, of which that echo remains despite the certificate of divorce being given.
So what I think is going on in the background is what Jesus spoke of as marriage being something permanent in God's eyes that man can't disrupt. This is critical for the marriage of the bride (the church) of which earthly marriage is a type. So that certificate of divorce was given as an allowance to deal with human frailty:
He said to them, “Moses, with reference to your hardness of heart,
permitted you to divorce your wives, but from the beginning it was not
like this. Now I say to you that whoever divorces his wife, except on
the basis of sexual immorality, and marries another commits adultery,
and whoever marries her who is divorced commits adultery.”
So in Deut there is a foreshadowing that the woman who receives the certificate of divorce is not being really divorced in the complete sense.
If the divorce really ended the marriage completely and returned her to a state of singlehood, then she would be free to marry anyone she wants. That this isn't the case tells us that certificate of divorce doesn't fully abolish the previous marriage -- something of it remains that no human action can change. Jesus tells us that divorce was an allowance of Moses to not put too heavy a burden on the Isrealites rather than something that describes how God views marriage (which is eternal).
There is also the prophetic interpretation, see Jer 3.1.
A saying: ‘Look, if a man divorces his wife, and she goes from him
and she becomes another man’s wife, will he return to her again?’ Will not that land be greatly defiled? And you have prostituted
yourself with many lovers, would you now return to me?” declares
This defilement now applies to Israel who left YHWH and married others and now wants to go back to YHWH. She is called a prostitute, despite the certificate of divorce. Note that it is not the fault of YHWH, but of the woman. So this should serve as a warning about the seriousness of our union with God and his displeasure at any kind of partner swapping, certificate of divorce or no:
“For I hate divorce,” says Yahweh, the God of Israel, “and he who
covers his clothing with violence,” says Yahweh of hosts. “You must be
attentive to your spirit and you must not be unfaithful.” Mal. 2.16
Here again, the word "unfaithful" is used in the context of divorce, again a foreshadowing of Jesus' declaration that those who divorce and remarry are comitting adultery.