I guess it really depends on what type of learner you are. From what I understand, a mentor is like a “personal trainer,” someone who gives you homework, tells you what books to read, etc. (in contrast to a teacher or professor who teaches a whole class at once). I think it is important to have friends who share similar interests to bounce of ideas, and I think it is important to know someone more knowledgeable than you who you could ask questions for your personal growth (e.g., a Prof who supervises your Ph.D. thesis would be such a person). However, I am not sure how important a “mentor” is for technical questions – I think that’s the 1-person equivalent of an answer poll via cross-validated or Quora. Anyways, I think a mentor may be a nice thing to have for certain people, but I wouldn’t say everyone needs a dedicated “mentor.”