This is a common misconception. You don't need a rooster for your hens to lay eggs, but a rooster is needed to fertilize the eggs to hatch them into baby chicks, but hens will lay just as many eggs whether there's a rooster around or not.
Some farmers prefer to keep an all-female flock, and urban or suburban homesteaders may not have a choice due to zoning laws that forbid roosters. Sometimes farmers choose not to keep roosters because they can be noisy and aggressive.
When you keep a rooster, you have to be careful about broody hens (who will sit on the eggs, hoping they will hatch), because the eggs will start developing into baby chicks if fertilized. You can use the broody hen to hatch eggs, but this involves some decision-making and supervision so that the eggs you eat aren't the ones she's sitting on.
Some farmers prefer to have a rooster because he does offer significant protection for the flock. He will guard against predators and sound the alert if there is any perceived danger.
There are significant pros and cons to keeping roosters. Not least significant is the amount of noise roosters make each and every morning. Unless you have a great deal of land and can site your roosters far from anyone's bedroom, be sure your family and neighbors are ready to cope with early morning (and occasional nighttime) crowing.
Roosters can also be a problem for the people and hens they live with. Rooster spurs are sharp, and large roosters are strong—so if you have small children who will be handling your birds, it may be best to avoid roosters. Roosters are also very sexually active, and can easily overwhelm a small "harem" of hens. If you have fewer than a dozen hens, it's probably best to avoid adding a rooster to the mix.
They protect the flock. Roosters will protect their hens from predators, keeping them safe by keeping them together and sounding the alert if a predator approaches. He will also defend them bodily against an attacker.
They complete the natural order of the flock. Chickens naturally live with males and females mixed, so you're allowing your hens to live as "normal" a life as possible with a roo in the mix. And owners have reported that they break up hen fights, find and give treats to their girls, encourage egg-laying and even monitor the nest boxes.
They're beautiful. Roosters are classic farmyard icons, and they are gorgeous to look at in many cases.
They have a lot of personality. Now, this can also be a con, but many folks find that roos are very entertaining and interesting creatures to have around.
You need one if you want to naturally hatch baby chicks. It's a biological reality.
Zoning laws. If your city or county doesn't allow them, don't get a rooster! You're just asking for trouble.
They can be noisy. Yes, they crow, and yes, in the morning, and yes, at other inopportune times as well. Think of your neighbors' reactions, especially if you live in close quarters.
They can be aggressive. Roosters have spurs on their ankles that can break the skin. You need to stay on top of "training" them that you're the bigger rooster, so they respect you, and you might want to think about it if you have small children or lots of farm visitors.
They can wear out hens. Chicken sex isn't consensual, and if you have too many roosters and too few hens (one rooster can take care of ten to twelve hens), your hens will start to show the wear: backs rubbed clean of feathers and physical exhaustion.