There is not necessarily a logical grammatical justification. In the case of million, usage patterns have shifted.
"Two millions" vs. "Two million"
According to Google Ngram, "two millions" has long been the standard expression. However, starting around 1850, its usage declined while "two million" rose in popularity. Around 1920, "two million" became the new norm, and today "two millions" is rarely used.
"Two thousands", "Two hundreds"
In contrast, neither "two thousands" nor "two hundreds" has ever been accepted usage.
If I had to speculate on the reason for the difference, it is probably because million has Latin origins, whereas hundred and thousand have Germanic origins. Therefore, the Old English-based inflection rules have always applied to hundred and thousand, as @MarkBeadles says, but the French-based rules for million have only recently started giving way.