Dinosaurs were already extinct in real life 4 million years ago, and are still around in the Savage Land in the present in the Marvel universe, so I don't think justifying the Dinobots had anything to do with the reason for the time gap.
I think the reason was they just wanted "Transformers crashed on Earth some time ago and are now waking up" to justify them being from space without anyone having seen them coming, because Hasbro's original idea was that they were "robots in disguise" whose presence was not widely known (which both the cartoon and comic quickly abandoned, even if the comics had people ignorant about their exact nature).
Of course, that could have been justified with just thousands of years rather than millions.
I think the reason was they just wanted "Transformers crashed on Earth some time ago and are now waking up" to justify them being from space without anyone having seen them coming, because Hasbro's original idea was that they were "robots in disguise" whose presence was not widely known (which both the cartoon and comic quickly abandoned, even if the comics had people ignorant about their exact nature).
Of course, that could have been justified with just thousands of years rather than millions.