system
Given the following post, respond as if you're commenting on Reddit:
human
Same school for PhD

Currently, I’m an undergrad in STEM. I’ve been thinking about staying at the same university for my PhD (right after undergrad) but I want opinions on whether the benefits outweigh the detriments.

I love my university, it’s a great fit for me and a great university (R1). I love this city too, and my partner’s family is here (and mine is only a few hours drive away). I originally planned on going to a different university, but the main reason I’m thinking about changing my mind lately is my current lab: my PI is, for lack of a better term, a big shot in my field, and this research is what I want to continue my career in. The lab culture is super healthy and respectful, which is honestly what I value most. I’ve heard countless horror stories about toxic labs making peoples lives miserable. I don’t want to go to a new lab and find myself in that situation.

Would this hurt my chances of getting a job (postdoc) afterwards? Do universities prefer people who did their undergrad and PhD at different schools?
gpt
It's no issue at all, as your undergrad really isn't factored in to your "Research career". It's your PhD and subsequent post-doc placements that are your "research years", and where its beneficial to have moved around.