Q:

Why didn't Sherlock just destroy Irene Adler's phone?

According to this explanation about Irene Adler's phone in the Sherlock episode "A Scandal in Belgravia": 

Irene had miniature explosives fitted throughout that would destroy the phone if anyone attempted to remove the hard drive, there being only four attempts permitted with unlocking the phone before the explosives would detonate.

Fine, but Sherlock doesn't need to unlock the phone. According to Irene (and common sense too) the pictures on that phone are exclusive and there shouldn't be any backup online or offline, otherwise the govt. agents could have gained them easily in other ways.
So, in that case, Sherlock can hand over the phone to govt. officials, they can take the phone to a dumping ground, pour petrol over it and destroy it physically or by any other means they prefer :P
......So why not?
Irene's phone might also contain information about terrorist groups (as Irene said to Mycroft that the lives of British citizens are at stake if the phone is destroyed, although not confirmed whether this is true) which might help the govt. in tracking them down but when it comes to scandals, most royal families, ministers or high profile politicians would rather be selfish and let people die out of terrorist attacks rather than compromising their dignity. And although Moriarty is a criminal mastermind and other criminals in "Sherlock's world" are deadly, Moriarty is still no Osama Bin Laden :v :v, that he would launch terrorist attacks on the scale of 9/11 :P

A:

This is a great first question. This answer by no means definitively resolves your question, but it's the best I can do!
I think Sherlock's interest in the phone is down to a few reasons. Firstly, he has been tasked by Mycroft and the government to track down the phone and recover its contents. Once the contents have been verified, they will be destroyed. Sherlock could take Irene's phone and have it destroyed, but were the pictures definitely on the phone? Definitely? Sure, Irene says they are, but we're talking about pictures of a member of the royal family. They need absolute proof, and that requires unlocking the phone, confirming the pictures exist and then destroying them.
However, when he first meets Irene the CIA burst in and he ends up saving the day, before Irene drugs him and escapes. Now there's a new twist to the tale - why are the CIA after the phone? What does it contain that is so valuable to them?
Following this, Irene supposedly dies. Sherlock's interest in the phone heightens. Why did she send it to him? What else is contained within it? We see him alienating himself from the world around him (although arguably no surprise there!) to try and figure out the code. When Irene comes back, he cracks the airplane code for her and he gets summoned to the aircraft once the Coventry scheme has been foiled. At this point, he finally cracks the code and the phone's contents are revealed.
Therefore, after this short summary of events, I'm really arguing two main points:

He needs to unlock the phone to make absolutely sure it contains the pictures he was originally tasked to find.
His interest in the phone is heightened given the effort the CIA have put in to getting it, and Irene.

Of course, these reasons miss one very important detail: How do we know she didn't have a backup of the photographs anywhere? Yes, she said she didn't - but she could have lied. I don't think there is a perfect resolve to this problem. Despite the ease with which a backup (offline) could have been made, the show has tried not to make any real issue out of that technological side of things, instead suggesting no backup had ever been made and asking us, as viewers, to simply believe this. If we do, then I the two reasons I've given above are the most logical I can think of as to why Sherlock didn't just destroy the phone.

