Over a large enough number of chicks, you do tend to get about 50/50 of males & females. But small numbers can easily be off one way or the other. Sometimes a clutch is mostly pullets, but people usually don't complain about that
And you're right, it's common to have an egg or two not hatch, or a chick not survive. But sometimes they do all make it, as you've noticed. If you like to eat chicken the solution is obvious, but if you try to keep all the males or find loving homes for them it gets much more difficult.