The answer is yes, apparently this does happen quite regularly, particularly with store-bought tomatoes. Along with tomatoes, corn, rice and squash are also prone to this type of early germination. When seeds germinate within fruit like this they are referred to as viviparous mutants – quite a name! With respect to tomatoes, there are a few reasons given for this 'mutant' behaviour, and the following information is adapted from the websites listed below.
There is a seed maturation agent and germination inhibitor called abscisic acid (ABA) in the gel sac around each tomato seed and it serves a purpose in the natural lifecycle of the tomato: when fruits fall to the ground in autumn the inhibitor prevents the seeds from germinating. (Without this enforced dormancy the seeds would simply sprout as soon as the fruit was mature and the seedlings would then probably not survive the winter.) When spring arrives, with conditions that are more favourable, the seeds mature and germinate. With commercially produced tomatoes the conditions in which the tomatoes are stored may mimic the spring conditions that trigger the germination process, thus prompting the seeds to begin growing. Other theories hold that some tomatoes may not produce enough abscisic acid or that the seeds simply 'ignore' the abscisic acid.
Either way, I'll be a little more wary of any odd-looking tomatoes from now on!
Information obtained from these websites: