This verses around is the answer to your question -
[24:2] "...And let a group of the believers witness their punishment."
[24:3] "...The fornicator does not marry except a [female] fornicator or polytheist,..."
If you have witnessed lashing of a fornicator, you should not let any believing person marry them. This is a part of the punishment of fornication in an Islamic state.
So if some one has been punished for fornication publicly (4 witnesses etc), its a part of their punishment that they would not get a believing person in marriage.
This is just like in the west, when you do an accident and apply for car insurance anywhere, you would end up being punished for that accident even if it was 25 years before the fact. Your record kind of gets ruined.
Just to put things in perspective, we also have verses like -
[2:221] "And do not marry polytheistic women until they believe...."
How would you know that they are believers? can someone look into their hearts and see if they have really started to believe ?,
Its about "public" declaration, just like above. If a person is publicly declared "fornicator" or "they are not believers" they don't get believing muslims for marriage