Reportedly - and this is from the Russians - they made a deal with the hostage takers to send in a small team to bring out the bodies of those killed on the first day.
During this, there was a small explosion which blew a hole in the side of (I think) the gym. The hostages started running out, and the terrorists responded by shooting at them and chasing out after them.
The Russians reacted to defend the escaping hostages, and as a result they had to follow through by storming the building.
I think, though, that this was inevitable.
NB: I'm unclear how the initial escape occurred...the russian military guy who talked on camera (albiet via a bad translator) said it was as a result of an explosion, but it's also been reported that the Russians themselves blew a hold in the wall when storming the building (not as reckless as it may sound, the terrorists wold have heavy barricading in the corridors).