Several reasons.
Roosters will fight each other making a bloody mess.
Roosters hog all the food.
Free range roosters make tough meat.
Roosters crow all day and a good part of the night. You don’t want a chorus.
Roosters will attack YOU....................
They still do all this when castrated? I’ve had capon many times when I was young, my mother would stuff them with different stuffings, roast them and they were quite good. Don’t see it around anymore, maybe too much trouble like you say, but someone was doing it. Too bad, seems like a waste to me.