In short, Bob Marley smoked marijuana because he practiced the Rastafarian religion, wherein the use of "ganja" (the Rastafarian term for marijuana, taken from an old Sanskrit word) is a holy sacrament.
According to About.com's Austin Cline,
One feature of Rastafarianism which is often misrepresented in the media is the ritual use of ganja (marijuana). Pious Rastas do not and should not use marijuana recreationally; instead, it is reserved for religious and medicinal purposes. Some do not even use it at all. When it is used, the purpose is to aid in meditation and perhaps help the user achieve greater mystical insight into the nature of the universe. (Read More...)
Bob Marley converted to Rastafarianism from Christianity in the mid-1960s, well before he achieved any international fame as a reggae musician. His conversion coincided with the conversions of thousands of his fellow Jamaicans of African descent, and as his fame grew, he began to stand as a symbol for both his culture and his religion.
Bob Marley did not use cannabis recreationally, and did not see its use as a casual matter. He viewed marijuana as a holy rite, much as Catholics view Holy Communion or some Native Americans view ceremonial usage of peyote. Viewing himself as a holy person (as do all Rastafarians), Marley strongly believed that marijuana opened up a spiritual door which allowed him to become the artist and poet he was.