Alignment describes a creature’s psychology, instincts and moral behaviour.
Creature of different race/species naturally differ biologically, which can influence and shape their psychology in unique ways.
All sentient creatures have free agency and alignment is not intended to pigeon hole every member of a race into a narrow spectrum, however, it is an indicator of typical behaviour one might expect, should they encounter a creature of a particular race.
Alignment is not only influenced by natural instincts and biology but also heavily influenced by culture and the gods a race or community worship.
Some creatures that hail from different planes of existence or are born from gods to serve them directly are more rigid in their alignment from birth.
These include demons and undead that are created evil.