It's generally (in east European mythology) attributed to the idea that because a vampire has been denied (or has refused) crossing over the threshold between life and death, he is subsequently denied crossing any "sacred" threshold, including a family home which would be sacred to the family living there. No such prohibition is associated with public or profane locations.
A complimentary myth is that of marking a cross in pitch on doors or windows, or hanging cloves of garlic there, to prevent demons or witches from entering through them.
A complimentary myth is that of marking a cross in pitch on doors or windows, or hanging cloves of garlic there, to prevent demons or witches from entering through them.