Apple never "announced" an 18 month cadence, that was reported as a rumor that everyone decided to believe. There's no plausible reason to have an 18 month cadence when the iPhone SoC that shares the same cores has a 12 month cadence. I'm guessing someone got hold of the planned M2 ship date, saw it was well over a year after M1 shipped and decided to infer an 18 month timeline based on two data points. Even if M3 comes out this time next year adding a third data point I would remain highly skeptical until early 2025 rolled around with no imminent announcement of M4.
I think schedule factors just worked out this way, between Apple having a lot of extra work launching the first ARM version of the various Mac product lines, development/testing timelines for the 2C and 4C variants, and TSMC altering their previous Q2 release cadence with N3. There's only such much engineering bandwidth, but since the subsequent versions will require less work they can tighten up the schedule later. Then add the pandemic, work from home, and ongoing supply chain delays on top of everything else. Heck the current lockdowns in China won't just affect iPhone production, they may end up delaying planned ship dates for M2 Pro/Max systems and M3 Macs also.
For instance, I think there's no way the original plan was to make M2 on N5 and M2 Pro/Max on N3 as rumored, but if that's how it ends up that's just a result of having to change plans to accommodate changing circumstances.
Now I could believe a 12 month cadence, a 24 month cadence, or even a 12 month cadence that sometimes skips the base or non base variants in a given generation. I just don't buy an 18 month cadence, because it makes no kind of sense at all.