As someone who actually really wanted to remain at my undergrad insitution and with my current PI (well known in my area and someone I've enjoyed working with), from asking around my undergrad department (top 15), I learned that my current departement only admits undergrads there under exceptional circumstances. Though I also observed the preference for someone they know vs someone who is from another university seemed to be very professor specific as some mentioned expiclity about not wanting UGs to remian at their UG insitution and some told me to try and apply anyway.
On my interview I think there were some undergrads from the school there interviewing but the number was small from what I can remember. My POI there actually also did not want me to remain at my undergrad insitution (even though my PI was my POIs advisor).
So from what I observed there is a really bad stigma about this.