Castillo would have been better just taking a knee. But usually when a fighters guard is down and his head snaps back the way it did, the ref will jump in. Corrales never did that.
When you look at when Corrales hit Castillo with the left hook against the ropes and his head went back, he was out on his feet. Any more damage from the hard hitting Corrales and there might have been no rematch. Now I don't like the fact that Corrales spit the mouthpiece out, but that's a veteran tactic that many fighters have done over and over again. Thing is its up to the ref to decide what happens. Corrales continued and scored the knockout he needed to win the fight.
Weeks took a point from Corrales the second time he spit out his mouthpiece and at that moment he looked like he would be finished very soon but came back and had Castillo out on his feet. Just one more punch would have had him on his face snoring.