That's because you're asking the AI to build in a town that doesn't exist. A bug in the AI will have it build an infinite number of units if the town in which you request the units to be built is not a town considered "owned" by the AI.
Always add a condition that the town has a townhall and a mine before building anything else there.
Additionally, the way you have it scripted, your expansion town hall will never be rebuilt if it is destroyed. So you need to add on the second line there to build a 2nd Temple of Tides (and a 3rd if you expect to have 3 expansions going). These should be built in town# order. That is, your first town hall should be built at town 0 (Main), the 2nd at town 1 (Exp1 in the editor), and 3rd at town 2 (Exp2 in the editor), etc. All with the condition that that town has a mine (otherwise, you will build the townhall for no real purpose)
As for it not building the expansion... The above may fix that. I haven't used the AI editor in a long time (I use jass) so I don't remember the code produced for the town, but for your expansion, set the Build Expansion Town to "Any" rather than Exp1 (because Exp1 will change as each mine is depleted).