Let's say for a moment he was under orders by Dumbledore, (when I'm saying this, I am not siding with you guys about Snape) why would he kill Dumbledore anyways? Dumbledore was the only one the Dark Lord ever feared. Why would Snape dispose of Dumbledore? But then these questions come up...Snape could be finding information about the horcruxes, so that could help Harry in the end right? Dumbledore knew his time was coming, so he decided it was their he was to die. He wouldn't be able to help Harry fight the Dark Lord. He picked a good spot to die. It would give Harry more motivation to destroy the horcruxes.