It's not actually Michael Bay's fault that the Transformers movies make no sense. According to the blindingly detailed Transformers Wiki, which tracks the continuity of the Transformers franchise:
The Transformers multiverse consists of at least 15,962,782 cataloged universal streams (1,176,325 of which have "come to termination"), according to the TransTech Cybertronians' exhaustive records. There are at least 59,927,225 realities that the TransTech Cybertronians have yet to catalog. Bug Bite claims that there are fifteen quadrillion concurrent realities.
Want to figure this all out? Check out the Transformers Wiki "continuity family" page, which attempts to group these quadrillion concurrent realities into just seven "families."