Indiana was a deciding point because it, and the immediately preceding elections, showed Cruz could not win against Trump in a one-on-one contest.
After Rubio dropped out, Cruz had a series of unexpected back-to-back landslide wins in Utah, Wisconsin, Colorado, and Wyoming. It seemed Cruz might be able to gather the necessary delegates to prevent Trump from getting the nomination on the first vote. The hope was this would free enough delegates from their obligations to Trump, and dropped out candidates, for Cruz to win in the next round. This worked for him in his 2012 US Senate election.
But then he suffered a near shutout receiving no delegates in New York, Connecticut, Delaware, Maryland, and Pennsylvania with just 2 from Rhode Island. These states are all in the northeast, the loss could be explained as being Trump's home turf, so Cruz declared Indiana his battleground. He lost again, and again it was a shut out.
What about John Kasich still splitting the vote? Even if Kasich had dropped out, Cruz would still have lost. Trump got a majority of the popular vote in every state after Wisconsin.
There was still a slim hope, why not fight on anyway? Because $MONEY$.
Running a presidential campaign costs a lot of money. Paying for advertising, travel, food, canvassers, advisors, lawyers, accountants, fund raisers, security, bumper stickers... Looking at Ted's campaign finances, his 2016 campaign spent $112 million.
But it also says he has $30 million still on hand, why stop now? Two reasons: debt and future campaigns.
The $112 million is money spent, but it doesn't include paying off debts and outstanding bills. I speculate Ted's accountants ran the numbers and told Ted if he didn't stop now his campaign would be left in debt and, as a failed candidate, unable to raise funds to pay it.
This leads to the other part, saving money for future campaigns. Ted Cruz is a US Senator from Texas. In 2012 Ted Cruz lost the first Republican Primary, but won in a runoff. He'll be up for reelection in 2018, and if 2012 is any indication he may be facing stiff competition. Money left over from his presidential campaign can be used in his 2018 US Senate campaign.
It's in his best interest to stop now, before his campaign goes into debt, while he still has a significant war chest for 2018.