Ironically, there is nothing surprising about President Donald Trump having extended the ceasefire in the US-Israel war against Iran. He probably had no other option. The war against Iran has proved too costly for his image. Trump has apparently been dragged into the US-Israel war against Iran under the illusion of a great and easy victory it would spell for him. If this was actually achieved, Trump’s diplomatic credentials would probably have been viewed a lot more differently than they seem to be today. Strangely, the failure of Israel to have its way against Iran in last year’s 12-day war in June hadn’t cautioned Trump about limitations that may be faced in actually defeating Iran. But that Trump has been convinced to join Israel this year leaves little to guess. He was probably led to believe that if US and Israel jointly initiated the strikes against Iran, the latter would have no other option but that of succumbing to defeat.  Or in other words, to Trump’s victory. This “logic” apparently convinced Trump. After all, chances of Iran not yielding to a superpower, militarily and diplomatically, seemed extremely limited. Further, Trump was confident of United States’ regional bases and support of its allies. Paradoxically, he chose to give little or practically no importance to Iran’s possible strategies, its strong points and so on. What was perhaps only given weight was that a weak Iran, due to impact of sanctions and the 12-day war, was in no position to fight for perhaps more than a week or at best a fortnight. And this assumption, call it illusion, a dream or a mirage, banking on what spelled great “success” for Trump prompted him probably to yield to what Benjamin Netanyahu desired.
However, everything did not go as Trump and/or Netanyahu had hoped/planned.  Iran was expected to collapse soon. A week went by, two weeks, a month and more with Iran asserting it could continue for months. As an angry Trump threatened to push Iranians to stone ages, raining bombs on them, the latter remained confident about their strength. Trump was apparently stunned by Iran’s retaliation against Israel and US bases in the Gulf/Arab states. His threats didn’t appeal to people at home. Nor were they appreciated by greater part of the world. US allies refused to join and/or support US in its war against Iran. The Gulf/Arab countries’ intercepted Iran’s attacks. However, they chose not to join US and Israel in their Iran-war. This was not what Trump had bargained for. Neither had he expected Iran to display its command over Strait of Hormuz. Not to be left behind, Trump hasn’t refrained from exercising naval blockade of Iran. 
As days passed, prospects of Iran yielding to Trump became more distant. Calling off the war as was done last year didn’t appeal to Trump. Last year, Israel had initiated the strikes and this year, it had done so along with US. Trump could afford to act as a third party last year. This time, its decision to call off the war would be almost a blatant acceptance of putting it mildly – accepting failure to defeat Iran. From no angle, would it be suggestive of Trump having guided US and Israel to victory against Iran. The question of regarding either party as a winner may be viewed as good as non-existent but yes it wouldn’t be erroneous to view all as losers.
The next best option to avoid continuity of the war was thus ceasefire. Just before Trump first announced the two-week ceasefire on April 8, he talked of raining hell on Iran, pushing them back to the stone-ages. The same was the pattern when period of ceasefire came close to its end. These were perhaps pressure-tactics exercised to force Iran to give in to what Trump asked for. But Iran remained tough, at least this is the impression it has created. Trump even expressed his options of acting “militarily.” It was expected that during the first period of ceasefire, US and Iran would hold second round of negotiations. The first round, lasting 21 hours (April 11), failed. Stage was literally set for the second round but Iran refused to be party to negotiations till the two parties agreed to a “shared framework.” Iran is firm on a permanent agreement on that there would be no attack on Iran in future. It was not willing to be bound to conditions set by US, also described as “bullying.” 
Trump had not probably expected such a tough posture from a party which had been considerably weakened by the war, in which it was targeted by US and Israel. But this has been the stand of Iran. And this has apparently left Trump with no option but to fall back on extending the ceasefire. Incidentally, this time, it has been extended without any date set for its end. It may be described as indefinite and also as one, which may be ended anytime, with/without warning. At least, this is what Iran probably suspects. Iran views it as a “tactic” for a surprise attack against it. Besides, it views its blockade as act of war. Iran is also not willing to participate in any negotiations till blockade against it is lifted. 
Trump had no option, but as mentioned earlier, to opt for ceasefire’s extension. But Trump has attempted to describe his usage of this diplomatic card, that is ceasefire’s extension, because of Pakistan’s request. In a way, Pakistan’s diplomatic role as a mediator in this war is also helping Trump make use of certain strategies – as and when required- by projecting Pakistan as responsible for the same. 
At present, Trump has limited options. However aggressively he may express his aim to target Iran, he also seems well aware of the loss the same spells for his image and for US, diplomatically and economically. To a degree, his being caught in a weak spot is also suggested by his recent attempt of using “religious” strategies in his favor. This refers to usage of AI generated images, with Trump looking like Christ. The same images were deleted due to objections voiced by Christian allies of Trump. Though Trump tried saying that those images, in his impression, were that of a doctor, the ones objecting to the same strongly criticized them as “blasphemy,” “unacceptable,” “offensive” and so forth. What cannot be ignored is that whether Trump desired his images to be similar to Christ or a health giver, his aim was apparently to “elevate” his image among the people at large.  And when they seemed to have the opposite impact, that is invite criticism, he chose to delete them. He has also tried giving religious justification for war against Iran. And this is apparently just a symbolic indicator of what a key goal of Trump seems to be, which is being accepted as above, ahead and greater than others. Trump’s attitude towards the US-Israel war against Iran appears to have been shaped markedly by this aim of his from the very beginning. Interestingly, this trend of his prompts him to give greater importance to words of others, whose primary purpose appears to be that of boosting his ego.  And so in all probability, convinced by Netanyahu that war against Iran would spell an easy and quick victory, Trump got trapped into a messy crisis. Now, getting out of this and/or even continuing the war doesn’t seem an easy drive for Trump. 
It may be noted, religious strategies tend to be used in general when politicians seem to be devoid of other strategies to win people’s support. This certainly is the trend in India.  But they don’t always work with people refusing to buy whatever politicians try convincing them with. Despite extensive usage of religious cards, Prime Minister Narendra Modi failed to win majority in preceding (2024) parliamentary polls. Similarly, so far, people in the world at large and at home have refused to be convinced by Trump’s justification of war against Iran. In this context, opting for ceasefire’s extension is perhaps the best strategy he could have opted for, at least for now!