Al-Biruni accepted the Class distinctions as put forward by Brahmins. But he did not approve of the untouchability practised by them. He said that things that were impure would always try to get back their purity and succeed.
For example, the sun purifies the air. The salt in sea-water prevents it from getting polluted. Without this natural purification, life would be impossible on this earth. He argued that untouchability is against natural laws.
The ideas of Al-Biruni exercised a powerful influence in the study of Sanskrit books. The rules regarding Varna System were formulated favouring the Brahmins. In real life, Varna was not so strict. For example, the antyaja (who were born outside the Varna System) were expected to work for the agriculturists and zamindars for small wages. Although they were socially suppressed, they were included in the economic activities.