The thing is, the party controls the rule making process. The delegates probably prefer Cruz to Trump, but they might prefer someone else to either. Or, if prefer isn't the right word, they might view another candidate as actually having a chance in November. So, when no one has 1237, they can tweak the rules however they see fit to give the right guy the nomination.
When Trump misses 1237, he's done.