We had a tenure track professor announce she was leaving at the start of the academic year. Documented in faculty meeting minutes. Job posting appeared shortly thereafter. Candidates brought in and offers were made. This person was up for tenure. The committee voted no for tenure since she was leaving. Is the committee in error here?
Usually people leave before they are up for tenure when they think the answer won't be a good one. A tenure package that doesn't get you tenure at Princeton might get you tenure no-questions-asked at state school. If you make that move as fast as possible, everything you have in the pipeline can be attributed to your new institution and help with promotion there, rather than throwing your output down a poisoned well. During my time at Mid-Ivy university tenure candidate A (best candidate) was denied, future tenure candidates B and C (weaker candidates) promptly left as soon as they lined up offers elsewhere.
Is the committee at error here? Ethically if they have submitted their package, I suppose it "should" be evaluated without respect to what the candidate does afterwards. However in the real world any offer of tenure or permanency is only provided at a cost of significant intraorganizational capital all the way up to dean & potentially president level and is only offered when the expected returns on such investment are likely.
At my previous job my colleague was up for a permanent scientific position in government and had completed his entire package when he started having stomach pains. Turns out he had stage 4 cancer, and the division did not put forth his package. We all donated our sick leave to him so he could keep his salary and insurance. When I resigned I brought up that he was not put up for the permanent position he had worked over a 6-7 year period to attain and my director said "well, when he beats the stage 4 cancer and can come back to work we will put his package forward" (paraphrasing). While extremely cold, I took it to mean that he would not create a permanent position for a terminally ill employee because then he wouldn't have the capital later on to get another one. So certainly if someone is unlikely to accept the offer of tenure the tenure process would not continue. For example, try interviewing for a job and then telling the hiring manager that you were going to take an offer elsewhere. Do you think you would still get a formal offer from this hiring manager?
The committee voted no for tenure since she was leaving. Is the committee in error here?
Whether it was "in error" or not clearly depends on your tenure regulations. They probably don't cover this case explicitly, but some do give committee members a fair amount of freedom to say "no" if they for some reason think that granting tenure to the applicant would be detrimental to the department.
However, more importantly, I wonder why the committee made this decision, and why it matters. Was the committee, or individual members, annoyed by the applicant leaving? Was it perceived as a pointless hassle to give tenure at this point? Maybe the decision wasn't even voted on but thrown out on formal grounds (my university would not allow somebody to go up for promotion who has handed in his resignation)?
Why does the decision matter to the applicant at this point? Would they have received faster promotion in their new place if they formally joined as associate professor? If so, was the committee made aware of this in time? It would be unfortunate if the applicant hoped to leave with tenure and the only reason why the committee threw out the case was because they falsely assumed it wouldn't matter anymore anyway.
All things considered, it's certainly possible that the committee purposefully decided to throw some sticks into the applicant's new career path, but honestly, some sort of miscommunication is probably more likely.
TL;DR: I cannot say anything conclusively. But if I assume the premise of your question in its most literal form ("The committee voted no for tenure since she was leaving"), then the possible explanations I can think of are that either the committee was in error, or they acted out of malice and/or vengefulness, or they were simply acting in accordance with the procedures of the institution where this took place.
Detailed answer: the question is missing many details about the situation, so I can only give a rather conditional and speculative answer, but as a general rule, a tenure vote should be based on the tenure candidate's achievements alone and on nothing else. To the extent that any committee member voted no because the faculty member would be leaving, I would regard such a vote as likely indication of either malice, or incompetence, or both. Calling it "in error" sounds about right.
With that said, there are other possible interpretations for what took place, which are not necessarily inconsistent with the details you included in your question, namely:
It is possible that the committee members who voted no had a sincerely held belief that the faculty member has not earned the tenure on the merits of her actual work, and that this had nothing to do with her announcing her departure.
It is possible that the "no" vote was a formality and meant to indicate that given the faculty member's announced departure, there is no reason to proceed further with her tenure review. The vote might still have been necessary according to the institution's policies, so people voted no to put the case to a formal rest. If this is the institution's tradition of how to handle such bizarre situations, then it may not be an indication of malice or any sort of error. (Note that I am referring to the situation as bizarre because that's how it seems to me; normally, if a faculty member is formally announcing their upcoming departure then only an institution with rather bizarre procedures would proceed with a tenure review for that faculty member when the outcome of that review is for all practical purposes meaningless.)
Unless you were on the committee, you have no way (or at least shouldn't have any way) to know why they voted no, so there's no way to evaluate if they made a mistake or not.
If there is a mistake to point out, it would be by the faculty member, or perhaps the chair, letting the matter get to the tenure committee at all, knowing that the faculty member was leaving. I would think that from the faculty member's point of view, a negative decision is worse than the issue never coming up for vote.