The City's policy is for trained life guards to save lives ... even if they go out of their assigned area.
The contract company's policy is do not go out of assigned area ... even if someone is dying.
The company was relieved of their legal responsibility once their employee walked off the job.
If something went wrong, they would not be liable.
I'm sure that the company could have used good PR judgement and handled the situation without punishing the lifeguard.