Remember, English uses many words in an idiomatic sense. Not everything is literal. Because 'shallow' means 'lacking depth' it is commonly used to describe people who do not display an depth of emotion. A person might be described as "shallow and self-centred" meaning that they think only of themselves, and through a lack of emotion, they don't care if their actions affect other people.