Because it's a question for which democrats can not under any circumstance win with any possible answer. In dodging the question they effectively left it to the listener to decide whether it's "yes" or "no". And to those saying the answer was "it's undecided", no it wasn't. It was a "lets talk about something way less likely to cause us damage and if Trump seats a 3rd justice well, what do you think we will do". The 3rd justice is effectively a forgone conclusion. Even lead democrats admit they are powerless to stop it at this point.
Lets look at the possible outcomes.
Some nonsensical gibberish political talk actually able to be contrived as a "yes". What happens? They will almost certainly lose any voter remotely close to center. Even justice Ginsberg which for quite a while was the most leftist justice in the court was against adding seats to the court. Her justification (and I rarely agreed with her on anything ever) was a fairly accurate account. It makes what is supposed to be the third, impartial non political branch of government, a political weapon for which any time a large enough party majority in the other two basically subvert the court and the entire law making process by throwing more people ideologically aligned with them in the court until they reach a majority. This blatantly defeats the purpose of 3 but equal branches of government. Which the supreme court should be interpreting laws but in the past has been used to effectively create laws of the land that wouldn't pass through congress or a presidential veto by interpretations of law.
Some nonsensical gibberish political talk actually able to be contrived as a "no". They will immediately lose the support of the further left because they have this level of hatred that anything Trump has done is bad and evil therefor the appointees he has made are evil. Despite both Gorsuch and Kavanaugh at times opposing cases presented by the Trump administration. Barrett would also likely rule against the administration in any number of scenarios as well. But what did the answer accomplish? It warmed over the more centrist voter but completely decimated the more energetic leftist voter. The people that are still angry that Sanders didn't get the nomination for two election cycles so far. Not a good idea. Numbers indicate there was a reasonable number of people that were on the left side of the spectrum that likely voted for Trump out of spite in the last presidential cycle because Sanders was not the candidate.
Effectively every evaluation I have seen of the path to victory for Biden and Harris involves an extraordinary Democrat voter turnout. If they lose the left they lose. If they lose the middle they lose. If they lose latinos they lose. If they lose suburban voters they lose. If they lose LGBTQ voters they lose. If they lose even a sliver of the black vote they lose. In an environment where Trump has higher favorable ratings across nearly all cross-sections than he had in the previous election there is no answer that has a favorable outcome for their ticket. A horrible position to be in.
The purpose of dodging it was there literally is no answer for which there is a possible outcome that isn't self destruction. Which inadvertently the non answer may be perceived as either a yes or no alienating a lot of different voters but perhaps a lower number overall. An example are now the two narratives.
Narrative one. Refusal to answer is a yes and through a statement Harris/Biden (and not well phrased) implies voters are too stupid/incompetent/unimportant to know what he would actually intend to do when they vote for him. He has publicly already demonstrably insulted prospective voters. Challenging them to push up contests, calling one fat, telling others if they don't like him taking guns don't vote for him, telling people to vote for the other candidate multiple times thus far, that day one he would work to raise taxes, and other unpalatable things he has said leaves an engaged segment, that heard those things, and come to this conclusion that they just don't think they are worth informing what their vote means. These are most likely the more centrists in the registered party pool. Think union democrats from places like Pennsylvania (essentially required for any path to a Biden win at this point as some information is looking to have him blown out in a number of high electoral vote states) that tend to be more moderate and against the idea of using the court in this way.
Narrative two. Refusal to answer a no and through that statement Harris/Biden enrages their most left leaning possible voters. Despite what one would think since they are the loudest it's a relatively small segment and most of those people live in states that are fairly safe for Biden/Harris. Think the western coastal states, New York, etc. These are the people that believe the narrative to their core that Trump is orange evil man tyrant racist and all he does is bad. That his two picks so far are gang rapists and who knows what other claims were made, without evidence. That Barrett would overturn Roe vs Wade, and ban all abortions (overturning that case would not do that, it would delegate the power to state legislatures), and cause some other who knows what. These people DEMAND packing the courts because Trump will leave office with 3 appointees and likely another 2 if he wins a second term. He will have put in more than half the court with younger conservative justices that likely will survive 4 terms of office if not more and open the door for things like 2A cases to be more likely to be heard and more safely brought to the table. Big consequences for the left side of the aisle.
So, answering Yes, No, or dodging are all bad but having an implied answer alienates the least people from a probabilistic perspective. I can't imagine they didn't anticipate this question in one of the debates or from reporters at some point. If they didn't anticipate it they should fire every single person on their staff as it's been a topic that has come up a lot after Trump was suspected to end up with 3 appointees long before Ginsberg passed. They likely ran the risk assessment, realized there was no good answer, so the dodge was the most likely to cause loss of the least voters.
If it was me saying a clear "no I won't" was probably the safest as the people most likely to be lost in the vote by doing so are in states Biden/Harris will carry fairly well anyway and by leaving people up in the air leaves states like Florida, Ohio, Pennsylvania, and other important states vulnerable to what the voters think instead of having a clear idea of intent from the candidate. The non answer will likely be a positive in the popular vote but the popular vote does not a presidential office win make.