To be fair, while Nazi Germany wasn't exactly democratic and there was a lot of politics in how laws were applied, being a communist activist was illegal both under Nazi German law as well as under West German law (in the 50s and 60s anyway).
The reasoning was less that someone had been convicted "earlier in this country" but that they had been convicted before at all, indicating they've literally done the same thing before and gotten punished for it.
If you buy into the logic that repeat offences constitute a more severe crime, it's sensible to take prior offences into account even if they were persecuted under a different jurisdiction.
Of course the idea that "resistance against the state" under the Nazi regime could serve as a prior offence seems ludicrous but let's not pretend the persecution of communists during the Cold War was fairer than the persecution of political undesirables before (though the punishment was obviously different).