Questions about todo, toda, todos and todas:
Q: Why is it todos los hombres and NOT todo los hombres?
The particular form of todo/a(s) used depends on the number and gender of the following noun. Since hombres is masculine and plural, the masculine plural form todos must be used.
Q: Why is it ella compró todo and NOT ella compró toda?
When you mean "everything" in general, the masculine singular form todo is used. The feminine form toda is not used to mean "everything" in general, even if the subject of the sentence is feminine, like ella in this example. This is because the form todo is not referring back to ella.
Q: Why is it Quiero manzanas y voy a comprar todas. and NOT Quiero manzanas y voy a comprar todos?
Spanish requires number and gender agreement between the word todo/a(s) and the noun it modifies, or the noun it refers to and replaces when used as a pronoun, as in this example. The word manzanas is both feminine and plural, which is why the correct form of the pronoun that refers back to manzanas is todas.