After next week, when Trump wins NY and Cruz has no shot at the nomination outright, we will see what Cruz's real goal is.
Cruz’ goal is what he said in his speech last night, to win 1237 delegates either before or at the convention. From what I heard last night, Kasich and Rubio might be able to release their delegates on the first ballot, so Cruz could lobby for those. There is also a hefty chunk of unbound delegates, mostly from 3 states, that Cruz would lobby for. So if Trump falls short of 1237 even by 1 delegate, Cruz could theoretically win on the first ballot by getting all the unbound delegates to vote for him.