“How did I get the Stone out of the mirror?”
“Ah, now, I’m glad you asked me that. It was one of my more brilliant ideas, and between you and me, that’s saying something. You see, only one who wanted to find the Stone — find it, but not use it — would be able to get it, otherwise they’d just see themselves making gold or drinking Elixir of Life.
Harry Potter and the Sorcerer's Stone, Chapter 17, The Man With Two Faces
Voldemort was a great wizard, he might have found a way to break the jinx. In fact he almost did find a way, most probably after reading Harry's mind.
What I want more than anything else in the world at the moment, he thought, is to find the Stone before Quirrell does. So if I look in the mirror, I should see myself finding it — which means I’ll see where it’s hidden! But how can I look without Quirrell realizing what I’m up to?
“What does this mirror do? How does it work? Help me, Master!”
And to Harry’s horror, a voice answered, and the voice seemed to come from Quirrell himself.
“Use the boy... Use the boy...”
Harry Potter and the Sorcerer's Stone, Chapter 17, The Man With Two Faces
Even if Harry was not around. All Voldemort had to do was to steal the mirror from Hogwarts and take it to his hiding place in the forests of Albania and analyze how to get the Philosopher's Stone out of the mirror.
Dumbledore expected Harry to save the stone. Right through out the series, you get the feeling that Dumbledore encouraged Harry. Maybe because he knew one day Harry had to face Voldemort.
“Well, I got back all right,” said Hermione. “I brought Ron round — that took a while — and we were dashing up to the owlery to contact Dumbledore when we met him in the entrance hall — he already knew — he just said, ‘Harry’s gone after him, hasn’t he?’ and hurtled off to the third floor.”
“D’you think he meant you to do it?” said Ron. “Sending you your father’s cloak and everything?”
“No, it isn’t,” said Harry thoughtfully. “He’s a funny man, Dumbledore. I think he sort of wanted to give me a chance. I think he knows more or less everything that goes on here, you know. I reckon he had a pretty good idea we were going to try, and instead of stopping us, he just taught us enough to help. I don’t think it was an accident he let me find out how the mirror worked. It’s almost like he thought I had the right to face Voldemort if I could...”
Harry Potter and the Sorcerer's Stone, Chapter 17, The Man With Two Faces
Harry, Hermione and Ron were awarded the points, despite inadvertently helping Voldemort because they risked their lives and managed to save the Philosopher's Stone from Voldemort