In the US., There are slight variations between states when it comes to a marriage license, but for most, you need the following to obtain one.
◾Birth certificate (or some proof of citizenship like a passport)
◾A photo ID (like a driver’s license)
◾Proof of divorce (if you have been previously married)
◾If you’re under 18, you need proof of consent by a parent
Since an undocumented immigrant would not "legally" have the first two, it could be assumed that they either lied or falsified the documents making the marriage null and void.
Getting married in the US. without a license is not recognized as a "legal bond". Religious ceremony's alone are not accepted as "proof" of marriage!
However, if the marriage occurred while the immigrant was in the country "legally", such as having a green card or visa that has since expired, then there may be a case to be considered, but there are still penalties.
Just because you didn't get caught, doesn't mean you didn't do it!