I have had this happen to me too, with people sticking on my wheel up a climb. I've learned from previous experiences in the opposite situation when I'm sticking on someone's wheel up a climb as well. If you're behind someone following them up a hill yes, it is motivational to stick to them, but I always keep some distance, as the OP said, when you get burnt out, especially on a climb, and stop or slow down, it happens faster than on a flat.