The court is not running away from the problem; Trump isn't president, so the problem has actually gone away.
Because there's no point in resolving a purely academic question, the courts generally accept the idea that it shouldn't spend taxpayer money on work that doesn't need to be done. When there are thousands of other cases working their way through the system, it doesn't make much sense for the court to answer questions that don't require answers.
The other reason for the mootness doctrine is that the courts believe they can get the best available information, argument, and advocacy from parties that actually have something to gain from winning the case. Here, the court can't trust Trump to argue the case because it doesn't know whether Trump has any real interest in defending the prerogatives of the presidency. Maybe he's planning to run again, but maybe he's more interested right now in making life miserable for President Biden. And if that's the case, maybe he'd like to tank the case so the Texas attorney general can start issuing subpoenas to the president and his son.
This tendency is the rooted in centuries of common-law precedent acknowledging that the courts shouldn't just sit around and offer answers to questions that aren't part of a real dispute. That principle resulted in the "cases or controversies" clause that limits the jurisdiction of Article III courts. There is no such constitutional limitation on the New York courts handling the case you're asking about, but they honor the mootness doctrine anyway. Society of Plastics v. Suffolk, 77 N.Y.2d 761, 772 (N.Y. 1991) (“Under the common law, there is little doubt that a "court has no inherent power to right a wrong unless thereby the civil, property or personal rights of the plaintiff in the action or the petitioner in the proceeding are affected." ”)
There are some exceptions to the mootness doctrine, including one for controversies that are "capable of repetition, yet evading review" -- essentially, for disputes that occur frequently but are too short-lived to be fully litigated. Abortion cases are a great example of this: If a woman is unable to obtain an abortion, she generally has less than nine months to take a case from filing through all its appeals before the baby is born, mooting the case.
But that exception isn't a good fit for Trump's case, because subpoenas like this to sitting presidents aren't all that common, and the four or eight years of a presidential term are typically going to be enough time to fully litigate the question.
This is especially true given the speed with which courts typically resolve cases that pose a credible threat to presidential prerogatives. For instance, Trump challenged another subpoena in Trump v. Vance, 140 S. Ct. 2412, (2020). In that case, the prosecutor issued the subpoena on August 1, 2019, and it was less than a year before the U.S. Supreme Court had weighed in.
So even though it's possible that the issue could come up again without being resolved before the president is out of office, it is not particularly likely, and therefore not a good candidate for resolution despite its mootness.