Well, first off we don't know that she wasn't doing her darndest to get Orestes to crush Cyril and his followers, as the city roiled in a nasty series of massacres (apparently first of Christians lured into an ambush by Jews, and then the Christians expelling all the Jews and taking all their stuff). This upset other Christians like Orestes, whose city just lost a big hunk of its population. Hypatia taught Christians, Jews, and Pagans, included Orestes, and Orestes often sought her counsel.
The threats were flying thick and fast, people were being killed, and even Orestes had been bloodied by a rock hurled by a monk, who Orestes then put to death. If Hypatia was in the middle of it (and given her philosophy and position, how could she not be?), then the people involved in the violent dispute would view her as a threat and a valid target, and perhaps a convenient way to sent a brutal message to Orestes.
How anyone gets a clear-cut anti-science message out of that is beyond me, because the details are so sketchy that you could make up almost any message about it, and indeed people have. Some of those would have been the basis of Sagan's retelling, perhaps
this one from 1720, titled "Hypatia: or, The history of a most beautiful, most vertuous, most learned, and every way accomplish'd lady; who was torn to pieces by the clergy of Alexandria, to gratify the pride, emulation, and cruelty of their archbishop, commonly but undeservedly styled St. Cyril." That book used her in an attack the Catholic Church, and the Catholics responded the following year with "The History of Hypatia, a most Impudent School-Mistress of Alexandria: Murder'd and torn to Pieces by the Populace, in Defence of Saint Cyril and the Alexandrian Clergy from the Aspersions of Mr. Toland"
Some books even say Hypatia was a Christian.
And then we have the confusion over the Great Library of Alexandria being burned by a mob in 391 AD versus Julius Caesar accidentally burning it in 48 BC. Perhaps it seems like a nitpick, but that's like thinking the Inca empire was conquered by the Spanish in 1971 instead of 1523, and it's longer than the span of time that's elapsed since the Pilgrims set foot on Plymouth Rock.