he was also accused of atheism, at least in the apology, if memory serves... yup, that's correct (man, i hadn't reread the apology in decades). there's a whole thing about meletus accusing socrates of being an atheist, and what precisely does that mean, and about socrates defending himself by going "it's not like my ideas are like those of anaxagoras, THAT guy's an atheist, not me!". the tale of anaxagoras is interesting too! while not as brazenly atheistic as, say, me, anaxagoras dared to posit that the sun might be not a god but instead (gasp! scandalous!) something very hot and very far away. this certainly seems like a society that's used to having -and punishing- people who don't fit in with religious orthodoxy.
of course it's a mistake, when looking at different places and times, to imagine the people living in them as basically the same as us, to imagine they had all of our same biases and preferences and cultural values and whatnot, this is the sin of ethnocentrism. but it is also a mistake to imagine them as something entirely different and to take what their texts say -written, in general, by highly specific subsets of the population for highly specific goals- at face value: those are the sins of exoticization and naivete. if you're studying any culture at any period, and the texts there go "oh, no, we can't even imaaagine there being any conflict between reason and faith, obviously there isn't any" and you know that if someone, at that time and place, would have been killed for saying there was some conflict between the two, then it behooves you to be suspicious.
atheism, agnosticism, and doubts about religion aren't modern ideas, just historically supressed ones. you find them in ancient india, in ancient china, in the ancient mediterranean, in ancient egyptian tombs, and probably elsewhere too i don't remember. point is it's easy to imagine oldtimers as being so spiritual and mystical and deeply religious as to not be able to imagine doubting the whole thing, when in reality they were probably just people... different, sure, in a bunch of ways, but also not so very different from us in others. some people could imagine a world without gods, other couldn't, just like today some people can and some people can't
the oldest song we have written down musical notation for, the song of sekilos, goes something like
while you're alive shine!
don't let anything make you too sad
cuz life is short and time doesn't forgive
might as well be a pop song, if you strum it right.