Multiple data nodes across a cluster of commodity hardware are spread across a large number of racks in order to facilitate an efficient Hadoop cluster. This is a feature to increase the fault tolerance of a Hadoop cluster.
The way fault tolerance is increased is via the replication of data blocks across multiple racks. To achieve this, racks are replicated and are termed as Rack replicas. And the purpose of Rack replica is to increase the reliability and robustness of the HDFS cluster.