Yes roosters do protect chickens and hens from other predators and will alert the chickens and hens to an danger that may be coming.
If you live in an area where chicken hawks are common or other chicken predators are common then having a rooster in the chicken pen or chicken coop is a great idea to protect the chickens and hens from any danger.
I would also recommend adding a top to the chicken coop cage to prevent chicken hawks from flying down into the chicken coop and scooping up either the rooster or chickens or hens.
I would also recommend putting some mesh wire around the chicken coop fence to prevent small animals from getting through the chicken coop and into the chickens.