Caste based on hate?

Originally a guild system. External invasions turned fluid labor division into a rigid hierarchy. It is a social failure.