Read some history of how that came to be. You might still disagree when you're done, but I suspect you'll at least be able to answer your own question.
I'm very used to engineers' quibbles, very focused views ending up being very narrow views, clever/stupid explanations of why various laws can't be enforced, and so on.
But this has the be the biggest instance of missing the point, intentionally or not, I've seen in quite some time.
> [...] and also there were events in history like china's cultural revolution, Stalin's great cleansing and the killing fields in Cambodia (to name a few) [...]
Under the assumption that is meant to be a sincere argument:
The difference between the holocaust and those crimes is that Germany's the country primarily responsible for the former, giving special meaning to the denial of that crime and the law banning its denial.
No legal system anywhere can be absolute about not determining what the "truth" is, even when it comes to speech. The most common example is yelling "fire!" in a crowded theatre and causing a panic. Or posting a bomb threat to social media. That kind of mischief is illegal in most places as there's actual harm. And the law will have to determine the truth that there was no fire or no bomb, and that your speech had no purpose except to cause harm.
Another example is speech used to commit fraud or extortion. Were your profitable lies to exploit the vulnerable based on a genuine belief, or did you have criminal intent? The law will have to decide, and the situation will not always be clear, and often it comes down to determining intent.
In the case of holocaust denial, in Germany the potential harm of allowing it is seen as more genocide, so they've calibrated their free speech laws in respect of that. But there's never an exact place to draw the line; every legal system is going to have to make such judgment calls.
I believe your reasoning is faulty. In the vast majority of cases the law lays out rules and a court will attempt to determine various facts (ie truths) and interpret the rules in some broader context.
Codifying truth into law is quite unusual and seems like a bad idea to me. But then prosecuting people for hurling insults also seems like a bad idea to me - I guess I'm just thoroughly American.