The reason is our society rewards style over substance - we live in a world where appearances are judged rather than looking too deep into a person. It's learned behaviour they have calculated that a fake persona where you don't express anything real, and modify your personality based on the circumstances is the most effective way for them to live their lives.
The growth of reality TV, internet and more knowledge at our hands means we have become amateur psychologists where we constantly watch, monitor and evaluate each others personalities closely. We watch Celebrity TV, read about Celebrity news and evaluate, judge and monitor their behaviour.
Therefore we have all become like celebrities where we constantly worry what others think about us. In any workplace or indeed in any situation, people are quick to label you for being too aggressive or having any opinions which might offend others, or just in any way being different. No one wants to stick out of the group and look different, therefore we modify or behaviours and opinion to fit in.
People are always looking to label your behaviour or personality rather than looking at our personality as changing based on the situation. Shallowness or fakeness is behaviour people use to deal with constantly being judged and having their behaviour labelled.
Another point; what is the definition of shallow? Just listening to people who claim to have all sorts of profound political beliefs or religious beliefs, or for example they justify their nasty behaviour at work or in a relationship saying they are trying help other people, when if you look at most peoples behaviour from a distance, it is ultimately self-serving no matter what they say.
However most people are generally not as naive, dumb or shallow as they appear to be, they may well have deep interests or opinions but act dumb in order to fit into the group. After all why should you assume that your thoughts or beliefs are somehow more meaningful or deep than another persons.
There are very intelligent people who appear to have shallow or stupid interests like reality TV but in their work-life they are very sharp, curious and learning. Therefore you should not judge people just on what you see on the outside. Use small talk as a way of getting the conversation to something of mutual interest, or find the real person.
Sadly it's becoming more apparent that truly shallow people don't have any true beliefs, are generally two-faced and modify the behaviour based on the circumstances to achieve their objectives, their behaviour is generally driven by peer pressure and jealousy.
Another factor is self-improvement literature which teaches people to change their behaviour to be successful therefore they change their behaviours, thoughts and opinions to what is the best fit. I find truly shallow people are generally parasitic, not in a financial way but in that they are just looking to get something out of you, to use you, to associate with you to make themselves look better or use you for something at a later date.
The worst types are people who don't even like you but just pretend to like you. Overall there is nothing wrong with being a little bit fake and keeping your thoughts to yourself, but you can be sure that those people who appear fake and shallow are just as thoughtful as you, they just hide it better and can't bear being themselves.