Hens lay eggs without a rooster being present. Many non-chicken people aren't aware of that. In fact, I've had people be really surprised that I'm able to have eggs for sale without a rooster in sight. The eggs are infertile, thus they won't produce chicks. If the farmer wants chicks, then a rooster is mandatory.
Besides siring chicks, roosters have a few other attributes, not many I'd say, but a few. They tend to boss the flock, breaking up squabbles among the hens. Some roosters take the bossing too far, actually beating up hens and attacking people. Those roosters are prime candidates for replacing.
Boss roosters also tend to protect the flock, sounding the early alarm if something is amiss. I've seen roosters attack cats, mongooses, and even dogs. People tell me that they are protecting the hens. I'm not so sure, because roosters by nature just like to fight. They will respond very quickly to any challenge. Of course most of those roosters don't last long. Either a dog gets them or a hawk has them for a meal. Older roosters often extend their protective act to attacking humans, thus leading to neck wringing, decapitation, or other forms of rooster execution.
A well civilized rooster can be a nice morning wake up alarm. Crowing at dawn is rather a nice way to wake up on a farm. But it's hard to find a rooster who doesn't also crow at night. That night crowing can be maddening until your brain learns to ignore it. It has taken a few years, but I no longer notice my neighbor's rooster at night. Luckily he's not a big night crower. But he does get going on a full moon.
And another thing, they are pretty. I've seen some gorgeous roosters. Really stunning. And a handsome rooster just looks so nice on a farm.
One last thing roosters are good for ....eating. If I order straight run chicks, then about 50% will be roosters. Looking at it realistically, a farm simply can't house all those roosters. The poor hens would be harassed to the point that they'd lay very few eggs. The roosters would fight among themselves. Life down on the farm wouldn't be good. So what to do? Simple. Eat them. Yum.