The whole strategy as presented in "Chosen" was just about a step and a half short of suicidal. Buffy had at her command a little over a dozen poorly armed, inexperienced, and, at best, only partially motivated, adolescent girls and half a dozen what she knew for a fact to be really competent, experienced fighters. She took the majority of her fighting force with her, where they would be needed the most, and left three teams, two people each, topside to handle the (relatively) easier task of blocking the three passages out of the school. Each of those teams consisted of one experienced fighter, who she trusted not to panic, and one fighter who was, at best, moderately proficient, more as back up to the real fighter than anything else. She put Wood with Giles in the most difficult spot, Dawn with Xander, and Andrew with Anya. Everyone else, she needed with her.
(Okay, I know that we all know all of that, but I like to build up to my argument here, so bear with me.)
As for the two man teams, why did she assign them the way that she did? Glad you asked.
Xander was the best choice to be with Dawn, because Buffy knew that he would be absolutely committed to protecting her up to and beyond the last breath in his body. No surprise there. Within the limitations of her mission, she was affording her baby sister the greatest possible chance of survival, slim though that chance might be.
Giles was with Wood for several reasons. Mainly, I think that she believed that they had formed a sort of rudimentary bond during their conspiracy to kill Spike, plus Wood was the closest to being a real demon fighter of all of what could be described as the amateur fighters (as in, recently arrived in Sunnydale, not part of her "real" soldiers) Supposedly, Giles would be able to devote his main attention to fighting Bringers and ubervamps and not so much to keeping Wood alive. It didn't really work out that way, but that can be chalked up to fortunes of war. Wood did the best that he could under the circumstances for someone by his own admission, "totally out of his league."
And now, finally, we come to the group in question: Anya and Andrew. The real subject of this thread. Why were they teamed together? This is what I believe:
Like Giles and Wood, Anya and Andrew had formed a rudimentary bond. at least enough of one to more or less work together at what Buffy probably believed was the least likely path for the Bringers to take, least likely being purely relative here. Trying to block any route was practically a guarantee of martyrdom. Andrew was, obviously, the rank amateur here, but Anya, as Buffy had personal knowledge to affirm just that very season, was not completely inexperienced when it came to fighting. Even without her demonic powers, the experience was still there, and that experience was what Buffy was counting on to make the difference.
So, having said all that as justification, I say that Buffy teamed Anya and Andrew the way that she did, and assigned them to the place that she did, because that was the best that she could do under the circumstances to assure at least a minimal chance of success of her mission. Plus, they were all that was left after the more important assignments were handed out.