Selection of judges has always been a difficult issue. As you've said, it's essentially impossible to find a perfect, impartial arbiter of the law. In reality, justices must be partial in the sense that they have to interpret the law in resolving a case - essentially creating law in the process. The best we can do is insulate the court from the politics of the day, and to limit their ability to impose personal ideology on the decision. The former necessitates selecting rather than (directly) electing judges, and the latter is a matter of the Court earning respect and its members honoring the call for "impartiality" as much as possible.
This is not to say we can ever expect justices to do so. The question, at least for me, is whether we are better off with the risk of an ideologically-influenced Court, or without one at all. If the Court is at odds with the rest of the government, then the Court undermines the (elected) government's policies, which can be a serious problem.
What gives the Court legitimacy is the respect given to it by other branches of government, obtaining a sort of judicial capital. By acting against those branches, the Court expends that capital. The only reason for another branch to even bother following the Court's decision at all is an understanding that the institution needs to exist (to call out some injustice later, for instance). Hence the Court is often under pressure to avoid diverging too far from the ideology of the government, for the sake of its own preservation. That is the only hope I can offer for a potentially "biased" Court not creating too much tension when its ideology opposes that of the government. It's worked surprisingly well - almost inexplicably so - in the United States, with only a few cases of outright rejection of the Court's authority.
The Court's ideology, in the best case, is not in sync with that of the government, so there are periods of opposition and of support that balance each other out. Confirmation of justices helps to limit drastic ideological clashes, and selection (over election) helps to insulate from current politics. Throughout all of this, the Court would have to remain cautious to avoid drastic and inconsistent swings of opinion (something that has been a problem with the Court in the past for the US, but I won't go to far into that right now). For me, that's better than the alternative of having no independent judiciary at all to resolve constitutional disputes.
I don't really have a point here, as its difficult for me to say anything definitely in such broad terms. Selection of judges will always be an awkward concept in a democratic society, but it fits better with the meritocratic ideal than does election - so if we're going to attempt to keep the court somewhat "impartial," its the better route to take.
I am surprised I even posted here...