There simply was no need, at any point during the episode, to blow up the ship or blow up Data --- and that's not hindsight -- that's the decision making process of the commanding officer of the ship.
Also, from the perspective of a professional writer, having your main character (Picard) kill a beloved supporting character who hasn't actually harmed anyone and was not acting of his own volition
would be suicide for the show. Generally, as writers, we try to avoid doing things that will make a large percentage of our fanbase evaporate, lol.
Geordi: We got a problem, Captain.
Wesley (the boy): The restore disks. They're for LCARS 2364.
Geordi: When we were at McKinley Station, they upgraded us to LCARS 2366 Service Pack 1.
Wesley: We have to restore to LCARS 64, then download the updates.
Riker: So what's the problem?
Geordi: Data changed the app store password too.