Media is a big part of what shapes a country's identity. Most people would just reflect back what they see, read or hear about any topic. This is even more true when it comes to identity.
However, there isn't one identity but many identities within any group. In addition, identity is an elusive concept, it's dynamic and changes happen at different paces across society: Older folks adjust slower than younger ones (that's why older people are considered conservative, as in "attached to identity characteristics such as values").
When media allows people to express themselves and debate issues, people tend to more or less agree on many fundamental issues and that is then considered the "Mainstream". If you strip people of the ability to control what defines the mainstream, identity problems arise.
Case in point, the tunisian society is not characterized by the availability of free media or the ability to freely debate social issues in an open manner. Media, for the last 20 years, pictured tunisia as a moderate society where everybody enjoys a good quality of life. The identity projected by the media started to get disconnected from the day-to-day life when fundamental issues such as human rights, corruption, social and religious values or the high cost of living for the middle class went missing from the public media scene. Any event that disturbed that picture perfect story was omitted by the media whether that's a terrorist attack in Djerba, a recent plot to attack american military training in Tunisia or this unbelievable yacht-gate story [French]. The result of all of this is that people feel alienated from any "government-sponsored" identity and therefore, they try to find refuge in what they feel most comfortable in which is usually a mix of conservative values and religious fervor. There's no risk the government would interject or try to influence an identity that is dominated by spiritual beliefs.
Political and Media freedom, or lack thereof, can lead to side effects that can have long lasting consequences. Tunisian identity is the last 20 years has been shaped by clear economic success (albeit wealth distribution hasn't been ideal), lack of political freedom and the fragmentation of society into western-leaning and eastern-leaning progressive groups on one end and a much more conservative group on the other end of the spectrum. Moderates are lost in the middle with fingers pointed at them from all sides. The country needs more openness and more communication among these groups or risk a lebanon-style fragmented society (but hopefully a democratic one...).