Having a belief system is different from having a religion. Organized religion likely came about out of the need to legitimize power structures (otherwise, why the hell would the populace, which outnumber the ruling class, not fight back against their injustices?)
You are right that the San seem to have a classless (or, as wikipedia describes it, egalitarian) society. So it works as a counter-example to my claim that "nothing predates classes".
Knife guy