Because that's how the writers wanted it. Easy. No, I'm kidding. If you go back and watch that episode again, at no point do we ever see more than maybe 30% of the Greater Krayt. We never see its legs, its tail, its back, or even its body. The original plan devised by Din and the townsfolk on Tatooine was to lure the Greater Krayt out and set explosives to go off under the Krayt's belly, a spot weaker than the rest of it. But the Krayt never exposed itself that much, it just started spitting venom and swimming around. So Din came up with a plan of strapping all the bombs to a Bantha and having the Krayt eat the Bantha. When he sets the explosives, he doesn't blow up the whole Krayt. He essentially just explodes its throat. It would be like swallowing a cherry bomb for a human. 90% of your body is fine, but what isn't REALLY isn't. So the vast majority of the Krayt was fine--until the Tusken Raiders started chopping it up for meat--but it's hard to survive when your throat has been blown up.