How familiar are you with Plato's and Xenophon's versions of the Apology? In both of them it's made quite clear that Socrates was not tried for being an "atheistic upstart" nor that he "needed to die." The presentation of Socrates' argument is different (Xenophon presents Socrates as acting decidedly arrogantly) but in that the two accounts are in perfect agreement. Socrates was no upstart--as he says himself he was 70 at the time of his trial, and he had been practicing dialectic for decades. In any case it seems that many Athenians lumped him together with the sophists, like Gorgias, an impression that Plato went to great pains to show was false. The sophists were well-established, there was nothing upstart-y about them. As Socrates himself notes the charge leveled against him (that he did not believe in the gods that the state believed in--not the same thing as atheism, a term that Plato never uses--but was introducing new ones and that he was corrupting the youth) is contradictory, as it asserts that he simultaneously does and does not believe in gods. Socrates was brought to trial for political reasons, especially for his connections to the Thirty Tyrants, and because he had personally pissed off a lot of important people in the state--Socrates lists the various types of people he pissed off during his attempt to disprove the Delphic Oracle's assertion that he was the wisest man alive, particularly emphasizing the politicians, poets, and craftsmen. And Socrates most certainly wasn't thought of as having to die. Socrates' death was his own goddamn fault, as he makes obvious in the Apology. For one thing, Socrates only was convicted by the narrowest of margins--he remarks that if only 30 had voted for him rather than against he would've been released, which shocks him. Athenian law only had standard penalties for a handful of the most heinous crimes--in the case of all other crimes after the vote of conviction the prosecution would offer a penalty (usually death, as Meletus did in Socrates' case) and then the defense would offer an alternative. This was usually exile (and was almost always accepted if offered), and Socrates remarks that though he was expected to offer exile he would not do so. Instead Socrates tried to propose that the state punish him with meals for life at the public expense, and when his students begged him to reconsider he proposed first a fine of one mina and then thirty minae, to be guaranteed and probably borrowed from his students. Both trivial and insulting amounts--his remarks in regard to the penalty were also decidedly insulting in both versions, and certainly turned many who would've been fine with exile against him. In any case the Assembly was stuck between the death penalty and an absurdly low one, after having been insulted with an offer for meals for life--the Assembly had no legal right to offer their own penalty, so Socrates in effect killed himself