Why did she die *after* the bugs were taken out?
From the very first deletion attempt, the bugs started collecting data on the android. Every time the room was refreshed, the residual bugs (with this data) began to decode the android and eventually infected her.