Say in a scenario, someone as bad as Hitler or Hitler himself had converted to Islam on his death bed, He would be forgiven for ALL his sins and therefore not punished for the sins that he did. This sounds disgusting and unjust to let a man like Hitler not receive any punishment for his actions. So why does Islam have such a concept and allows this?
Obviously, forgiveness has some conditions and requirements. Islam doesn't state every sinner will be forgiven upon his repentance or as soon as conversion to Islam. Quran explicitly says in 4:1
But repentance is not accepted of those who continue to do evil deeds up until, when death comes to one of them, he says, "Indeed, I have repented now," or of those who die while they are disbelievers. For them we have prepared a painful punishment.
Thus, this idea is not from Islam.
There's a difference of opinion about this matter:
Soms scholars say that only converting to Islam is cleaning your waistcoat based on the long hadith saying:
... Islam wipes out all the previous (misdeeds)? ... (Sahih Muslim)
Note that the person who converted in this hadith 'Amr ibn al-'Aass prior to Muhammad's () answer displayed above actually had the following conversation with our prophet ():
He (the Holy Prophet) said: What has happened to you, O 'Amr?
(I) replied: I intend to lay down some condition. He asked: What condition do you intend to put forward? I said: should be granted pardon.
so the person was aware of his misdeeds. 'Amr indeed fought, killed and tortured Muslims before converting, but he became a good Muslim afterwards.
Other scholars say that only those misdeeds from which one has repented after conversion are forgiven based on:
Say to those who have disbelieved [that] if they cease, what has previously occurred will be forgiven for them. But if they return [to hostility] - then the precedent of the former [rebellious] peoples has already taken place. (8:38)
There's also a hadith saying:
Allah's Messenger (ﷺ) said, "If a person embraces Islam sincerely, then Allah shall forgive all his past sins, and after that starts the settlement of accounts, the reward of his good deeds will be ten times to seven hundred times for each good deed and one evil deed will be recorded as it is unless Allah forgives it." (Sahih al-Bukhari)
And another one saying:
A man said, "O Allah's Messenger (ﷺ)! Shall we be punished for what we did in the Pre-Islamic Period of ignorance?" The Prophet (ﷺ) said, "Whoever does good in Islam will not be punished for what he did in the Pre-lslamic Period of ignorance and whoever does evil in Islam will be punished for his former and later (bad deeds).
(Sahih al-Bukhari and Sahih Muslim)
This view is held by a majority of scholars.
Also note that this might also only apply to misdeeds on the rights of Allah worship matters, monotheism (oneness etc.) or doing something which is haram, but doesn't harm any person, as for the case that it harms a person there seem to be a second difference of opinion, while some scholars consider a general amnesty others even consider applying the hudud (punishments) for example in Radd al-Mohtar رد المحتار a book on hanafi jurisprudence you may read:
وإذا كان وقت الشرب غير موجب للحد لا يحد بعد الإسلام بخلاف ما إذا زنا أو سرق ثم أسلم فإنه يحد لوجوبه قبل
So if a person was not subject for hadd punishment while drinking (alcohol) they wouldn't be subject of punishment after converting to Islam in opposite to the case of a person committing adultery or robbery who converted afterwards they would be subject of had punishment as they were before.
(Source fatwa islamweb #32104)
Drinking alcohol is a sin one may perform, but not harm anybody else, while adultery or robbery is one were another person is involved! The same would apply -by analogy- to killing if all conditions of applying hadd are met.
This actually is in opposite to a fatwa given by imam a-Shafi'i on an adulterer who converted to Islam.
Finally the hadith of the killer of 100 people shows that the morality of forgiveness you are condemning was present in former religions (Judaism and Christianism too):
The Prophet (ﷺ) said, "Amongst the men of Bani Israel there was a man who had murdered ninety-nine persons. Then he set out asking (whether his repentance could be accepted or not). He came upon a monk and asked him if his repentance could be accepted. The monk replied in the negative and so the man killed him. He kept on asking till a man advised to go to such and such village. (So he left for it) but death overtook him on the way. While dying, he turned his chest towards that village (where he had hoped his repentance would be accepted), and so the angels of mercy and the angels of punishment quarrelled amongst themselves regarding him. Allah ordered the village (towards which he was going) to come closer to him, and ordered the village (whence he had come), to go far away, and then He ordered the angels to measure the distances between his body and the two villages. So he was found to be one span closer to the village (he was going to). So he was forgiven."
(See for example in Sahih al-Bukhari and Sahih Muslim)
Commentators of this hadith ended by the statement that the punishment or forgiveness in the hereafter is by Allah as he said:
Allah's Messenger (ﷺ) said to us while we were in a gathering, "Give me the oath (Pledge of allegiance for: (1) Not to join anything in worship along with Allah, (2) Not to steal, (3) Not to commit illegal sexual intercourse, (4) Not to kill your children, (5) Not to accuse an innocent person (to spread such an accusation among people), (6) Not to be disobedient (when ordered) to do good deeds. The Prophet (ﷺ) added: Whoever amongst you fulfill his pledge, his reward will be with Allah, and whoever commits any of those sins and receives the legal punishment in this world for that sin, then that punishment will be an expiation for that sin, and whoever commits any of those sins and Allah does not expose him, then it is up to Allah if He wishes He will punish him or if He wishes, He will forgive him." So we gave the Pledge for that.
(See for example in Sahih al-Bukhari and Sahih Muslim)
We only know that a punishment in this life replaces that in the hereafter Does punishment in the worldly life replace punishment in the hereafter?.