hmm, I think there are several things to think about:
1. It should be a piece that the student may perhaps like in terms of musicality, etc. If students hate the pieces they work on, progress is very slow....
2. Depending on level, there should be something they are learning, or skill that would help them improve.....ie, you pick Bach inventions as an introductory into voices, and having different hand independence, etc.
3. Ask what the student likes in terms of music....like if they are really new, play a few things and see where their interests are....some people like strong melodies, others like sad minor songs, others may like very fast and happy....
4. Errors in picking a piece imo are students wanting to learn pieces they are not quite ready for yet....like if they like the Liszt Hungarian Rhapsody in C#minor, and can't quite reach nor have the technique for yet, you could create many bad habits and more of a forced playing techbique versus a flowing technique.....also, I think balancing the repertoire is something overlooked.....like if the student wants to work on 2 pieces at a time, choose contrasting.....
of course, all of this is my opinion, but those were things I enjoyed when I took lessons, etc....