For much the same reason that they take it upon themselves to first look for Hermione, second lock the troll in the girls' toilets (though they don't know it's the girls' toilets yet) and finally to rescue Hermione themselves (although in this case there is another, probably stronger, reason: supreme urgency, and also a desire to rectify their mistake).
For much the same reason that Harry and Ron choose, in the next book, to fly a car to Hogwarts.
For the same reason they then, after meeting with Lockhart, proceed straight to the Chamber of Secrets, instead of back to the staff room.
For broadly similar reasons to Hermione trying to stop Snake jinxing Harry's broom herself with her magical fire.
It's Harry, Ron and Hermione! They're Gryffindors!
Have you ever been an 11-/12- year old kid?
The light of adventure is in their eyes. They wanna save the world. Of course they don't necessarily act sensibly, they're kids.
'You ... this isn't a criticism, Harry! But you do ... sort of ... I mean - don't you think you've got a bit of a - a - saving-people thing?' she said.
He glared at her.
'And what's that supposed to mean, a "saving-people thing"?'
'Well ... you ...' she looked more apprehensive than ever. 'I mean ... last year, for instance ... in the lake ... during the Tournament ... you shouldn't have ... I mean, you didn't need to save that little Delacour girl ... you got a bit ... carried away ...'
Harry Potter and the Order of the Phoenix - p.646 - Bloomsbury - Chapter 32, Out of the Fire
'Oh, you don't know Potter as I do, Bellatrix,' said Malfoy softly. 'He has a great weakness for heroics; the Dark Lord understands this about him.'
Harry Potter and the Order of the Phoenix - p.690 - Bloomsbury - Chapter 35, Beyond the Veil
That's, to me, the nub of it. But there are other points.
They, like us, are relatively new to the magical world. Of course, when we read this book, we don't know anything about Apparition, and it is a bit of a shame that the end of this book gets a little harder to swallow when you re-read it and you do know that Dumbledore could zip to and from Hogsmeade (if not Hogwarts) in an instant, but they're probably a bit naive about how long it would take to alert Dumbledore and get him back. Ron and Hermione should know about Apparition (Ron from growing up in a wizarding family, Hermione from reading any book that comes under her nose), but Harry probably had no clue. Leaving Apparition to one side, though, owl post is still slow. The snowy owl "generally [flies at] less than 30 miles per hour (48 km/hr) but they can reach speeds exceeding 50 miles per hour (80 km/hr)." (http://environmentalaska.us/snowy-owl.html). Edinburgh (which is almost certainly way too far south for Hogwarts) is over 400 miles from London by road. Now admittedly Hedwig can travel as the owl files, but that's still 8 hours at top speed (which she'd never ever be able to maintain, but let's allow for a little bit of magic). Now it's true that the exact mechanics of owl post aren't fully fleshed out in the books, but owl post, we can safely say, is slow.
Then there's the matter of convincing him.
"Dear Professor Dumbledore,
You know that teacher you've been trusting to guard the Philosopher's Stone with you, well he's going to steal it. Honest. Trust us.
Yours sincerely,
3 first years"
It would be different if he was there. When they thought they could talk to him, convince him, that was different. But what do you put in a letter?
Also, I mean, they put 2 and 2 together. They know that it's not a coincidence. It's safe to assume Snape has done something to get Dumbledore out of the way and keep him there. I think they just kind of subconsciously take for granted that he can't make it back in time, because it confirms their worst fear, and it also unleashes their inner heroes, you know, it licenses them to do what they kinda wanna do anyway!
So, why bother sending a letter afterwards?
Well what else are you gonna do at that stage? I suppose they could indeed have already sent the letter. But they don't really think like that, and clearly when you read that book you did think like that, but I didn't. I don't think many people did. Dumbledore's gone. You take for granted he's not coming back. So there's no choice left, right? They have to go through the trapdoor themselves. They then focus on preparing for that. Then once they're there, okay, they now think, right, backup time, if we can't do it, we'll send something to Dumbledore and at least alert him, at least let him know. At least it's something. A plan C.
Also, you know, I don't think what's going through Harry's mind is "this, at last, is the time to send an owl to Dumbledore, so let's make sure Ron and Hermione send the owl", I think it's "if anything happens to me, how do I make sure my friends don't follow me to their deaths, and instead get out of here"? You know, he's mainly telling Ron not to follow and sending an owl to Dumbledore is a way for him and Hermione to do something nominally more useful than plunging after Harry to near-certain death.
Seeing the open door somehow seemed to impress upon all three of them what was facing them. Underneath the Cloak, Harry turned to the other two.
'If you want to go back, I won't blame you,' he said. 'You can take the Cloak, I won't need it now.'
Harry Potter and the Philosopher's Stone - p.200 - Bloomsbury - Chapter 16, Through the Trapdoor