i notice that all of my infantry always suck

my spearmen suck. my Urban Militia suck. my Almohad Urban Militia suck. everything i ever build sucks. they enemy AI always owns them by default, no matter what they are fighting.

how am i supposed to make my units not suck, exactly?