Now, assuming the road to hell is paved with good intentions, it would stand to reason the road to heaven is paved with bad intentions. (If you don't believe in heaven or hell, just go with the concept.)
Let's say you are viewing a locked room filled with... 50 people and there is a brick wall and one way glass separating you from them. You have two buttons, a green button and a red one. If you press the green button, the doors open and everyone leaves unharmed. Pressing the red button fills the room with nerve gas and everyone dies.
You press the green button. Due to faulty wiring, the room fills with gas and everyone dies. Do you go to hell, even though you were trying to save everyone? You are responsible for the death of 50 people.
Let's say you press the red button. Due to faulty wiring, the doors open and everyone leaves. Do you go to heaven since you saved everyone? Even though you were trying to kill them all?