There are many reasons why a captain might choose to allow people into the cockpit, they might be airline personnel, they might be his next door neighbour, they might be his son and daughter.
I imagine if it's not explicitly prohibited by an airline then it is nothing to be worried about.