Uryu and Squad Zero

Since Uryu has been revealed to have been a good guy, why did he kill Senjumaru and save the royal guards from her Bankai? I understand he’s trying to appear loyal to the quinces but couldn’t he have just let her dealt with all of them without interfering? If he hadn’t stepped in, all of them were going to be defeated anyways.